Skip to content
Myr

Add --t-min/--t-max to histogram script

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

authored by David Peter · committed by David Peter · parent f742329 · Browse files · 1 file+8 added−2 removed
This commit

State

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

Diff stats

1 file+8 added−2 removed

  • other:+8 added−2 removed

1 file+8 added−2 removed

modified:scripts/plot_histogram.py+8 added-2 removed
18 unmodified lines
19)20parser.add_argument(21 "-o", "--output", help="Save image to the given filename."22)23parser.add_argument(24 "--t-min", metavar="T", help="Minimum time to be displayed (seconds)"25)26parser.add_argument(27 "--t-max", metavar="T", help="Maximum time to be displayed (seconds)"28)2930args = parser.parse_args()3132with open(args.file) as f:
4 unmodified lines
37else:38 labels = [b["command"] for b in results]39all_times = [b["times"] for b in results]4035t_min = np.min(list(map(np.min, all_times)))36t_max = np.max(list(map(np.max, all_times)))41t_min = float(args.t_min) if args.t_min else np.min(list(map(np.min, all_times)))42t_max = float(args.t_max) if args.t_max else np.max(list(map(np.max, all_times)))4344bins = int(args.bins) if args.bins else "auto"45histtype = args.type if args.type else "bar"46
13 unmodified lines