From a6bcc2d8e338133e8a54290f48134245bbaa5b67 Mon Sep 17 00:00:00 2001
From: giordano <domenico.giordano@cern.ch>
Date: Thu, 19 Sep 2019 15:05:18 +0200
Subject: [PATCH] passing to real time

---
 atlas/kv/atlas-kv/parseResults.sh | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/atlas/kv/atlas-kv/parseResults.sh b/atlas/kv/atlas-kv/parseResults.sh
index 2bc5b4db..b543cacf 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
   #-----------------------
-- 
GitLab