diff --git a/atlas/kv/atlas-kv/parseResults.sh b/atlas/kv/atlas-kv/parseResults.sh index 2bc5b4db4903bd9c4c4a08fe77cf7900e0c78a4e..b543cacfa15b1ccaec20347dea8c0dfa7a7cb166 100644 --- a/atlas/kv/atlas-kv/parseResults.sh +++ b/atlas/kv/atlas-kv/parseResults.sh @@ -21,15 +21,15 @@ function parseResults(){ echo "[parseResults] parsing results from" proc_*/out_*.log local STATUS=0 # Parse 'Event Throughput: xxxx ev/s' - res=`grep -A1 "INFO Statistics for 'evt'" proc_*/AtlasG4_trf.log | grep "<cpu>" | sed -e "s@[^(]*([[:blank:]]*\([ 0-9\.]*\) +/-.*@\1@" | awk 'BEGIN{amin=1000000;amax=0;count=0;} + res=`grep -A2 "INFO Statistics for 'evt'" proc_*/AtlasG4_trf.log | grep "<real>" | sed -e "s@[^(]*([[:blank:]]*\([ 0-9\.]*\) +/-.*@\1@" | awk 'BEGIN{amin=1000000;amax=0;count=0;} { val=1./(int($1)/1000.); a[count]=val; count+=1; sum+=val; if(amax<val) amax=val; if(amin>val) amin=val} END{sep=sprintf("%*s", 120, "");gsub(/ /, "*", sep); n = asort(a); if (n % 2) { median=a[(n + 1) / 2]; } else { median=(a[(n / 2)] + a[(n / 2) + 1]) / 2.0;}; -printf "\"wl-scores\": {\"sim\": %.4f} , \"CPU_score\": {\"score\": %.4f, \"avg\": %.4f, \"median\": %.4f, \"min\": %.4f, \"max\": %.4f}", sum, sum, sum/count, median, amin, amax -}' || (STATUS=1; echo "\"[ERROR] Something went wrong in parsing the CPU score\"")` +printf "\"wl-scores\": {\"sim\": %.4f} , \"wl-stats\": {\"score\": %.4f, \"avg\": %.4f, \"median\": %.4f, \"min\": %.4f, \"max\": %.4f}", sum, sum, sum/count, median, amin, amax +}' || (STATUS=1; echo "\"[ERROR] Something went wrong in parsing the real time score\"")` #----------------------- # Generate json summary #----------------------- @@ -38,7 +38,6 @@ printf "\"wl-scores\": {\"sim\": %.4f} , \"CPU_score\": {\"score\": %.4f, \"avg\ local OUTPUT=${APP}_summary.json echo -e "{\"copies\":$NCOPIES , \"threads_per_copy\":1 , \"events_per_thread\" : $NEVENTS_THREAD , $res , \"app\":`cat $BMKDIR/version.json`}" > $OUTPUT cat $OUTPUT - ln -s $OUTPUT report.json #----------------------- # Return status #-----------------------