New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New plot script: Run duration over time #1760
Conversation
with open(sys.argv[1]) as json_file: | ||
data_json = json.load(json_file)['benchmarks'] | ||
|
||
# Build flat list of {name, begin, duration} entries for every benchmark item run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As is evident, I am not the biggest Python hacker. I can make things work, but there are probably various things that could be improved here. Please let me know!
|
They add 5 to 15 order lines, which is why you should see 11 "lines" in there. Bear in mind that everything is still super inefficient.
Added. |
That looks already much better. If we create a collection of these over time, I am sure we can sell it as modern art at some point. |
Anything else that needs to be done here? |
Closing this for now as #1766 will change the JSON format. Will re-open and change to new JSON format once that is done. |
Please re-review the changes made in 12c7bcc
data.append({'name': name, 'begin': begin / 1e9, 'duration': duration}) | ||
for run_json in benchmark_json['successful_runs']: | ||
data.append({'name': name, 'begin': run_json['begin'] / 1e9, 'duration': run_json['duration'], 'success': True}) | ||
for run_json in benchmark_json['unsuccessful_runs']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really happy with the code duplication here, but I have no idea how to avoid it without making everything more verbose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am sure we can handle these two duplicated lines
Adds a script that plots the duration of individual benchmark runs over time. Example:
Detailed version: