stat+csv_summary.sh (631B)
1#!/bin/sh 2# perf stat csv summary test 3# SPDX-License-Identifier: GPL-2.0 4 5set -e 6 7# 8# 1.001364330 9224197 cycles 8012885033 100.00 9# summary 9224197 cycles 8012885033 100.00 10# 11perf stat -e cycles -x' ' -I1000 --interval-count 1 --summary 2>&1 | \ 12grep -e summary | \ 13while read summary num event run pct 14do 15 if [ $summary != "summary" ]; then 16 exit 1 17 fi 18done 19 20# 21# 1.001360298 9148534 cycles 8012853854 100.00 22#9148534 cycles 8012853854 100.00 23# 24perf stat -e cycles -x' ' -I1000 --interval-count 1 --summary --no-csv-summary 2>&1 | \ 25grep -e summary | \ 26while read num event run pct 27do 28 exit 1 29done 30 31exit 0