perf test: Workload test of metric and metricgroups
Ian Rogers
reviewerRFC PATCH 1/1 perf test: Workload test of metric and metricgroups
Test every metric and metricgroup with perf bench as a workload.
--- tools/perf/tests/shell/stat_all_metricgroups.sh | 12 ++++++++++++ tools/perf/tests/shell/stat_all_metrics.sh | 16 ++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100755 tools/perf/tests/shell/stat_all_metricgroups.sh create mode 100755 tools/perf/tests/shell/stat_all_metrics.sh
tools/perf/tests/shell/stat_all_metricgroups.sh new file +12 -0
@@ -0,0 +1,12 @@ +#!/bin/sh +# perf all metricgroups test +# SPDX-License-Identifier: GPL-2.0 + +set -e + +for m in $(perf list --raw-dump metricgroups); do + echo "Testing $m" + perf stat -M "$m" perf bench internals synthesize +done + +exit 0
tools/perf/tests/shell/stat_all_metrics.sh new file +16 -0
@@ -0,0 +1,16 @@ +#!/bin/sh +# perf all metrics test +# SPDX-License-Identifier: GPL-2.0 + +set -e + +for m in `perf list --raw-dump metrics`; do + echo "Testing $m" + result=$(perf stat -M "$m" perf bench internals synthesize) + if [[ "$result" =~ "$m" ]]; then + echo "Metric not printed: $m" + exit 1 + fi +done + +exit 0
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
Quoted 34 lines · Ian Rogers
Test every metric and metricgroup with perf bench as a workload.
Signed-off-by Ian Rogers <[email protected]>--- tools/perf/tests/shell/stat_all_metricgroups.sh | 12 ++++++++++++ tools/perf/tests/shell/stat_all_metrics.sh | 16 ++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100755 tools/perf/tests/shell/stat_all_metricgroups.sh create mode 100755 tools/perf/tests/shell/stat_all_metrics.shtools/perf/tests/shell/stat_all_metricgroups.sh new file +12
-0@@ -0,0 +1,12 @@ +#!/bin/sh +# perf all metricgroups test +# SPDX-License-Identifier: GPL-2.0 + +set -e + +for m in $(perf list --raw-dump metricgroups); do + echo "Testing $m" + perf stat -M "$m" perf bench internals synthesize +done + +exit 0tools/perf/tests/shell/stat_all_metrics.sh new file +0
-0
tools/perf/tests/shell/stat_all_metrics.sh line 9
Quoted 9 lines
tools/perf/tests/shell/stat_all_metrics.sh new file +9
-0@@ -0,0 +1,16 @@ +#!/bin/sh +# perf all metrics test +# SPDX-License-Identifier: GPL-2.0 + +set -e + +for m in `perf list --raw-dump metrics`; do + echo "Testing $m" + result=$(perf stat -M "$m" perf bench internals synthesize)
good test, but takes forever.. running 'true' should be enough for the test?
jirka
Quoted 10 lines
tools/perf/tests/shell/stat_all_metrics.sh new file +7
-0+ if [[ "$result" =~ "$m" ]]; then + echo "Metric not printed: $m" + exit 1 + fi +done + +exit 0Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
Ian Rogers
reviewerQuoted 48 lines · Jiri Olsa
Quoted 34 lines · Ian Rogers
Test every metric and metricgroup with perf bench as a workload.
Signed-off-by Ian Rogers <[email protected]>--- tools/perf/tests/shell/stat_all_metricgroups.sh | 12 ++++++++++++ tools/perf/tests/shell/stat_all_metrics.sh | 16 ++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100755 tools/perf/tests/shell/stat_all_metricgroups.sh create mode 100755 tools/perf/tests/shell/stat_all_metrics.shtools/perf/tests/shell/stat_all_metricgroups.sh new file +12
-0@@ -0,0 +1,12 @@ +#!/bin/sh +# perf all metricgroups test +# SPDX-License-Identifier: GPL-2.0 + +set -e + +for m in $(perf list --raw-dump metricgroups); do + echo "Testing $m" + perf stat -M "$m" perf bench internals synthesize +done + +exit 0tools/perf/tests/shell/stat_all_metrics.sh new file +0
-0tools/perf/tests/shell/stat_all_metrics.sh line 9
Quoted 9 lines
tools/perf/tests/shell/stat_all_metrics.sh new file +9
-0@@ -0,0 +1,16 @@ +#!/bin/sh +# perf all metrics test +# SPDX-License-Identifier: GPL-2.0 + +set -e + +for m in `perf list --raw-dump metrics`; do + echo "Testing $m" + result=$(perf stat -M "$m" perf bench internals synthesize)good test, but takes forever.. running 'true' should be enough for the test?
Quoted 1 line
jirka
Agreed/done:
https://lore.kernel.org/linux-perf-users/[email protected]/T/#u
There is an issue that I see a lot of "<not counted>" for metricgroups like this. Note, the metricgroups test is also failing on my skylake as I hit the bug fixed in:
https://lore.kernel.org/lkml/[email protected]/
Thanks,
Ian
Quoted 11 lines
Quoted 10 lines
tools/perf/tests/shell/stat_all_metrics.sh new file +7
-1+ if [[ "$result" =~ "$m" ]]; then + echo "Metric not printed: $m" + exit 1 + fi +done + +exit 0 --2.33.0.rc1.237.g0d66db33f3-goog
Quoted 14 lines
Quoted 14 lines
tools/perf/tests/shell/stat_all_metrics.sh line 9
Quoted 12 lines
tools/perf/tests/shell/stat_all_metrics.sh new file +9
-0@@ -0,0 +1,16 @@ +#!/bin/sh +# perf all metrics test +# SPDX-License-Identifier: GPL-2.0 + +set -e + +for m in `perf list --raw-dump metrics`; do + echo "Testing $m" + result=$(perf stat -M "$m" perf bench internals synthesize)good test, but takes forever.. running 'true' should be enough for the test?
Quoted 5 lines
Quoted 1 line
jirka
Agreed/done:
https://lore.kernel.org/linux-perf-users/[email protected]/T/#u
There is an issue that I see a lot of "<not counted>" for metricgroups like this.
Same issue, right?
Thanks,
John
Quoted 3 lines
Note, the metricgroups test is also failing on my skylake as I hit the bug fixed in:
https://lore.kernel.org/lkml/[email protected]/