]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
perf tests: Add test for stat delay option with duration_time
authorIan Rogers <irogers@google.com>
Tue, 19 May 2026 01:41:06 +0000 (18:41 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sat, 23 May 2026 00:39:28 +0000 (21:39 -0300)
commitf83deb058025d1b6eb0ff297422634a5a11ef87b
treeea5c1b5607e2fb7859c1cff8eb097ff57ec19b8e
parent0b18bced5444f4fc54ba4500c377f2e88d31ea09
perf tests: Add test for stat delay option with duration_time

Add a new test case `test_stat_delay` to `stat.sh` to verify that
`duration_time` correctly excludes the delay period when using the
delay option (-D).

The test runs `perf stat -D 1000 -e duration_time sleep 2` and
verifies that `duration_time` is ~1s (excluding the 1s delay), not
~2s.

Assisted-by: Antigravity:gemini-3-flash
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Francesco Nigro <nigro.fra@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/shell/stat.sh