mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
perf tests: Speed up metrics checking shell tests
Optimize the execution of the metric validation and metric listing shell test suites: 1. `stat_metrics_values.sh`: The Python metric validator runs the `perf bench futex hash` workload for each validated metric relationship. Reduce the benchmark runtime limit from `-r 2` (2 seconds) to `-r 1` (1 second). This cuts the workload duration in half while still generating sufficient PMU events to satisfy non-zero threshold metric validations. 2. `stat_all_metrics.sh`: The metric checking test runs `perf stat` sequentially across all 433+ listed metrics. Change the default workload for system-wide runs from `sleep 0.01` to `true`. This avoids the 10ms sleep delay on each sequential metric invocation, saving over 4 seconds of total wall time during full test suite runs. Assisted-by: Antigravity:gemini-3.1-pro Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
parent
ae42a2a2a3
commit
b02e597450
|
|
@ -7,7 +7,7 @@ ParanoidAndNotRoot()
|
|||
[ "$(id -u)" != 0 ] && [ "$(cat /proc/sys/kernel/perf_event_paranoid)" -gt $1 ]
|
||||
}
|
||||
|
||||
test_prog="sleep 0.01"
|
||||
test_prog="true"
|
||||
system_wide_flag="-a"
|
||||
if ParanoidAndNotRoot 0
|
||||
then
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ fi
|
|||
pythonvalidator=$(dirname $0)/lib/perf_metric_validation.py
|
||||
rulefile=$(dirname $0)/lib/perf_metric_validation_rules.json
|
||||
tmpdir=$(mktemp -d /tmp/__perf_test.program.XXXXX)
|
||||
workload="perf bench futex hash -r 2 -s"
|
||||
workload="perf bench futex hash -r 1 -s"
|
||||
|
||||
# Add -debug, save data file and full rule file
|
||||
echo "Launch python validation script $pythonvalidator"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user