Skip to content
Myr

Support hardware counters in plotting scripts (#984)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Peter · committed by GitHub · parent bc3a3f0 · Browse files · 3 files+16 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+16 added−3 removed

  • other:+16 added−3 removed

3 files+16 added−3 removed

modified:scripts/plot_histogram.py+2 added-2 removed
52 unmodified lines
53 "--min",54 "--t-min",55 dest="value_min",56 type=float,57 help="Minimum value to display (seconds, or MiB for memory)",57 help="Minimum metric value to display",58)59parser.add_argument(60 "--max",61 "--t-max",62 dest="value_max",63 type=float,64 help="Maximum value to display (seconds, or MiB for memory)",64 help="Maximum metric value to display",65)66parser.add_argument(67 "--log-count",68 help="Use a logarithmic y-axis for the event count",
60 unmodified lines
modified:scripts/plot_utils.py+6 added-1 removed
3 unmodified lines
4 "time_wall_clock": ("Time [s]", 1),5 "time_user": ("User CPU time [s]", 1),6 "time_system": ("System CPU time [s]", 1),7 "memory_peak_resident": ("Peak resident memory [MiB]", 1024**2),8 "cpu_cycles": ("CPU cycles", 1),9 "instructions": ("Completed CPU instructions", 1),10 "cache_references": ("Cache references", 1),11 "cache_misses": ("Cache misses", 1),12 "branch_misses": ("Mispredicted branches", 1),13}141516def add_metric_argument(parser):
1 unmodified line
18 "--metric",19 choices=METRICS,20 default="time_wall_clock",21 help="Metric to plot (default: time_wall_clock). "17 "Times are in seconds; memory is in MiB.",22 "Times are in seconds; memory is in MiB; hardware counters are unscaled counts.",23 )242526def validate_metric(parser, results, metric):
6 unmodified lines
modified:scripts/README.md+8 added