- tmp = sorted(value_list)
- eight = len(tmp) // 8
- ret = tmp[3*eight:-eight]
- return tmp # ret
-
-
-iteration = -1
-parent_iterations = list()
-current_iterations = list()
-num_tests = None
-while 1:
- iteration += 1
- parent_lines = list()
- current_lines = list()
- filename = f"csit_parent/{iteration}/results.txt"
- try:
- with open(filename) as parent_file:
- parent_lines = parent_file.readlines()
- except IOError:
- break
- num_lines = len(parent_lines)
- filename = f"csit_current/{iteration}/results.txt"
- with open(filename) as current_file:
- current_lines = current_file.readlines()
- if num_lines != len(current_lines):
- print(f"Number of tests does not match within iteration {iteration}")
- sys.exit(1)
- if num_tests is None:
- num_tests = num_lines
- elif num_tests != num_lines:
+ iteration = -1
+ parent_iterations = list()
+ current_iterations = list()
+ num_tests = None
+ while 1:
+ iteration += 1
+ parent_lines = list()
+ current_lines = list()
+ filename = f"csit_parent/{iteration}/results.txt"
+ try:
+ with open(filename) as parent_file:
+ parent_lines = parent_file.readlines()
+ except IOError:
+ break
+ num_lines = len(parent_lines)
+ filename = f"csit_current/{iteration}/results.txt"
+ with open(filename) as current_file:
+ current_lines = current_file.readlines()
+ if num_lines != len(current_lines):
+ print(
+ f"Number of tests does not match within iteration {iteration}",
+ file=sys.stderr
+ )
+ return 1
+ if num_tests is None:
+ num_tests = num_lines
+ elif num_tests != num_lines:
+ print(
+ f"Number of tests does not match previous at iteration "
+ f"{iteration}", file=sys.stderr
+ )
+ return 1
+ parent_iterations.append(parent_lines)
+ current_iterations.append(current_lines)
+ exit_code = 0
+ for test_index in range(num_tests):
+ parent_values = list()
+ current_values = list()
+ for iteration_index, _ in enumerate(parent_iterations):
+ parent_values.extend(
+ json.loads(parent_iterations[iteration_index][test_index])
+ )
+ current_values.extend(
+ json.loads(current_iterations[iteration_index][test_index])
+ )
+ print(f"Time-ordered MRR values for parent build: {parent_values}")
+ print(f"Time-ordered MRR values for current build: {current_values}")
+ parent_values = sorted(parent_values)
+ current_values = sorted(current_values)
+ max_value = max([1.0] + parent_values + current_values)
+ parent_stats = jumpavg.AvgStdevStats.for_runs(parent_values)
+ current_stats = jumpavg.AvgStdevStats.for_runs(current_values)
+ parent_group_list = jumpavg.BitCountingGroupList(
+ max_value=max_value).append_group_of_runs([parent_stats])
+ combined_group_list = parent_group_list.copy(
+ ).extend_runs_to_last_group([current_stats])
+ separated_group_list = parent_group_list.append_group_of_runs(
+ [current_stats])
+ print(f"Value-ordered MRR values for parent build: {parent_values}")
+ print(f"Value-ordered MRR values for current build: {current_values}")
+ avg_diff = (current_stats.avg - parent_stats.avg) / parent_stats.avg
+ print(f"Difference of averages relative to parent: {100 * avg_diff}%")
+ print(f"Jumpavg representation of parent group: {parent_stats}")
+ print(f"Jumpavg representation of current group: {current_stats}")