diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2013-12-20 14:10:10 +0530 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2013-12-20 14:11:35 +0530 |
commit | fa9cf054b5644d395df30b0c7c6ad4912c298bfb (patch) | |
tree | ad2d512a6a6d97bdfc6e4c71c58b11695b1822c3 | |
parent | 0bd810bfeace9e3b223865f621c46018726899c0 (diff) |
is-cpu-isolated: Print Average/Min/Max isolation times
Change-Id: I3708395b8f56524d51e6eaa46eaabc460eb0b934
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
-rwxr-xr-x | common/scripts/is-cpu-isolated.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/common/scripts/is-cpu-isolated.sh b/common/scripts/is-cpu-isolated.sh index 7b21972..0ff03cf 100755 --- a/common/scripts/is-cpu-isolated.sh +++ b/common/scripts/is-cpu-isolated.sh @@ -58,6 +58,8 @@ get_isolation_duration() { x=0 AVG=0 + MIN=99999999 + MAX=0 while [ $x -lt $sample_count ] do let x=x+1 @@ -89,15 +91,24 @@ get_isolation_duration() { isdebug echo "" let AVG=AVG+T - if [ $T -lt $MIN_ISOLATION -a $RESULT="PASS" ]; then + if [ $T -lt $MIN_ISOLATION -a $RESULT="PASS" ]; then RESULT="FAIL" fi + + # Record minimum and maximum isolation + if [ $T -lt $MIN ]; then + MIN=$T + fi + if [ $T -gt $MAX ]; then + MAX=$T + fi done let AVG=AVG/$sample_count isdebug echo "Result:" echo "test_case_id:Min-isolation "$MIN_ISOLATION" secs result:"$RESULT" measurement:"$AVG" units:secs" + echo "Min isolation is: "$MIN", Max isolation is: "$MAX" and Average isolation time is: "$AVG isdebug echo "" } |