Skip to content

Commit

Permalink
perf stat: Disable metric thresholds for CSV and JSON metric-only mode
Browse files Browse the repository at this point in the history
These modes don't use the threshold, so don't compute it saving time
and potentially reducing events.

Signed-off-by: Ian Rogers <[email protected]>
  • Loading branch information
captain5050 committed Oct 29, 2024
1 parent cc51436 commit affd3c4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tools/perf/builtin-stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -2561,6 +2561,14 @@ int cmd_stat(int argc, const char **argv)
goto out;
}

if (stat_config.csv_output || (stat_config.metric_only && stat_config.json_output)) {
/*
* Current CSV and metric-only JSON output doesn't display the
* metric threshold so don't compute it.
*/
stat_config.metric_no_threshold = true;
}

if (stat_config.walltime_run_table && stat_config.run_count <= 1) {
fprintf(stderr, "--table is only supported with -r\n");
parse_options_usage(stat_usage, stat_options, "r", 1);
Expand Down

0 comments on commit affd3c4

Please sign in to comment.