Skip to content

Commit

Permalink
oe-build-perf-report: Display more than 300 commits and date instead …
Browse files Browse the repository at this point in the history
…of commit number
  • Loading branch information
ninetteadhikari committed Mar 27, 2024
1 parent 7f06c7b commit 9d010cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion scripts/lib/build_perf/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def gv_value(self):
return "null"
return self / 1024

def measurement_stats(meas, prefix=''):
def measurement_stats(meas, prefix='', time=0):
"""Get statistics of a measurement"""
if not meas:
return {prefix + 'sample_cnt': 0,
Expand All @@ -319,6 +319,7 @@ def measurement_stats(meas, prefix=''):
stats['quantity'] = val_cls.quantity
stats[prefix + 'sample_cnt'] = len(values)

start_time = time # Add start time for both type sysres and disk usage
mean_val = val_cls(mean(values))
min_val = val_cls(min(values))
max_val = val_cls(max(values))
Expand All @@ -334,6 +335,7 @@ def measurement_stats(meas, prefix=''):
stats[prefix + 'max'] = max_val
stats[prefix + 'minus'] = val_cls(mean_val - min_val)
stats[prefix + 'plus'] = val_cls(max_val - mean_val)
stats[prefix + 'start_time'] = start_time

return stats

6 changes: 4 additions & 2 deletions scripts/oe-build-perf-report
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,9 @@ def print_html_report(data, id_comp, buildstats):
test_i = test_data['tests'][test]
meas_i = test_i['measurements'][meas]
commit_num = get_data_item(meta, 'layers.meta.commit_count')
samples.append(measurement_stats(meas_i))
# Add start_time for both test measurement types of sysres and disk usage
start_time = test_i['start_time'][0]
samples.append(measurement_stats(meas_i, '', start_time))
samples[-1]['commit_num'] = commit_num

absdiff = samples[-1]['val_cls'](samples[-1]['mean'] - samples[id_comp]['mean'])
Expand Down Expand Up @@ -473,7 +475,7 @@ Examine build performance test results from a Git repository"""
group.add_argument('--branch', '-B', default='master', help="Branch to find commit in")
group.add_argument('--branch2', help="Branch to find comparision revisions in")
group.add_argument('--machine', default='qemux86')
group.add_argument('--history-length', default=25, type=int,
group.add_argument('--history-length', default=300, type=int,
help="Number of tested revisions to plot in html report")
group.add_argument('--commit',
help="Revision to search for")
Expand Down

0 comments on commit 9d010cc

Please sign in to comment.