brintos

brintos / linux-shallow public Read only

0
0
Text · 844 B · 279f19c Raw
27 lines · bash
1#!/bin/bash2# perf metrics value validation3# SPDX-License-Identifier: GPL-2.04 5shelldir=$(dirname "$0")6# shellcheck source=lib/setup_python.sh7. "${shelldir}"/lib/setup_python.sh8 9grep -q GenuineIntel /proc/cpuinfo || { echo Skipping non-Intel; exit 2; }10 11pythonvalidator=$(dirname $0)/lib/perf_metric_validation.py12rulefile=$(dirname $0)/lib/perf_metric_validation_rules.json13tmpdir=$(mktemp -d /tmp/__perf_test.program.XXXXX)14workload="perf bench futex hash -r 2 -s"15 16# Add -debug, save data file and full rule file17echo "Launch python validation script $pythonvalidator"18echo "Output will be stored in: $tmpdir"19$PYTHON $pythonvalidator -rule $rulefile -output_dir $tmpdir -wl "${workload}"20ret=$?21rm -rf $tmpdir22if [ $ret -ne 0 ]; then23	echo "Metric validation return with erros. Please check metrics reported with errors."24fi25exit $ret26 27