- factory = BitCountingMetadataFactory(cmax, parent_stats.avg)
- new_stats = factory.from_data(new_values)
- print "DEBUG parent: {p}".format(p=parent_stats)
- print "DEBUG new: {n}".format(n=new_stats)
- common_max = max(parent_stats.avg, new_stats.avg)
- difference = (new_stats.avg - parent_stats.avg) / common_max
- print "DEBUG difference: {d}%".format(d=100 * difference)
- classified_list = classifier.classify([parent_stats, new_stats])
+ current_factory = BitCountingMetadataFactory(val_max, parent_stats.avg)
+ current_stats = current_factory.from_data(current_values)
+ both_stats = factory.from_data(parent_values + current_values)
+ print "Value-ordered MRR values for parent build: {p}".format(
+ p=parent_values)
+ print "Value-ordered MRR values for current build: {c}".format(
+ c=current_values)
+ difference = (current_stats.avg - parent_stats.avg) / parent_stats.avg
+ print "Difference of averages relative to parent: {d}%".format(
+ d=100 * difference)
+ print "Jumpavg representation of parent group: {p}".format(
+ p=parent_stats)
+ print "Jumpavg representation of current group: {c}".format(
+ c=current_stats)
+ print "Jumpavg representation of both as one group: {b}".format(
+ b=both_stats)
+ bits = parent_stats.bits + current_stats.bits - both_stats.bits
+ compared = "longer" if bits >= 0 else "shorter"
+ print "Separate groups are {cmp} than single group by {bit} bits".format(
+ cmp=compared, bit=abs(bits))
+ classified_list = classifier.classify([parent_stats, current_stats])