diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2013-12-20 13:38:39 +0530 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2013-12-20 14:11:35 +0530 |
commit | 0bd810bfeace9e3b223865f621c46018726899c0 (patch) | |
tree | d6fe352fbd29bb94ff60fa533ca689d656f8f57b | |
parent | 2ded17114f2f5ae4287be68867224023f42e0c42 (diff) |
is-cpu-isolated: print average isolation time
This adds support to print average isolation time in measurement field and
seconds in units. Similar change is done in openembedded/nohz-isolation.yaml.
Change-Id: Ibe2b545bb769cc2b4c3e6ac34fa12b8bff819e52
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
-rwxr-xr-x | common/scripts/is-cpu-isolated.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/common/scripts/is-cpu-isolated.sh b/common/scripts/is-cpu-isolated.sh index 0d56447..7b21972 100755 --- a/common/scripts/is-cpu-isolated.sh +++ b/common/scripts/is-cpu-isolated.sh @@ -57,6 +57,7 @@ get_isolation_duration() { T2="$(date +%s)" x=0 + AVG=0 while [ $x -lt $sample_count ] do let x=x+1 @@ -86,14 +87,17 @@ get_isolation_duration() { isdebug echo "Time in seconds: " echo $T isdebug echo "" + let AVG=AVG+T if [ $T -lt $MIN_ISOLATION -a $RESULT="PASS" ]; then RESULT="FAIL" fi done + let AVG=AVG/$sample_count + isdebug echo "Result:" - echo $RESULT": min-isolation "$MIN_ISOLATION "seconds" + echo "test_case_id:Min-isolation "$MIN_ISOLATION" secs result:"$RESULT" measurement:"$AVG" units:secs" isdebug echo "" } |