]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
split the production of the stacktrace summary to a separate function:
authormkrzewic <mikolaj.krzewicki@cern.ch>
Mon, 19 May 2014 10:43:46 +0000 (12:43 +0200)
committermkrzewic <mikolaj.krzewicki@cern.ch>
Mon, 19 May 2014 10:43:46 +0000 (12:43 +0200)
stackTraceTree

example use: ./benchmark.sh stackTraceTree */*/stacktrace.txt

PWGPP/benchmark/benchmark.sh

index a5dad656dad23775abdebdef135560b7de04491d..af210e42d2909752fa5292d14dd51c51e2faf696 100755 (executable)
@@ -2065,6 +2065,22 @@ EOF
   return $?
 )
 
+stackTraceTree()
+(
+  awk '
+       BEGIN { 
+               print "frame/I:method/C:line/C:cpass/I:aliroot/I";
+               RS="#[0-9]*";
+               aliroot=0;
+             } 
+             { 
+               if ($3 ~ /Ali*/) aliroot=1; else aliroot=0;
+               gsub("#","",RT); 
+               if ($NF!="" && RT!="" && $3!="") print RT" "$3" "$NF" "0" "aliroot
+             }
+      ' "$@" 2>/dev/null
+)
+
 goMakeSummary()
 (
   #all the final stuff goes in here for ease of use:
@@ -2104,29 +2120,8 @@ goMakeSummary()
   echo "commonOutputPath=${commonOutputPath}"
 
   #summarize the stacktraces
-  awk '
-       BEGIN { 
-               print "frame/I:method/C:line/C:cpass/I:aliroot/I";
-               RS="#[0-9]*";
-               aliroot=0;
-             } 
-             { 
-               if ($3 ~ /Ali*/) aliroot=1; else aliroot=0;
-               gsub("#","",RT); 
-               if ($NF!="" && RT!="" && $3!="") print RT" "$3" "$NF" "0" "aliroot
-             }
-      ' 000*/cpass0/*/stacktrace* 2>/dev/null > stacktrace.tree
-  awk '
-       BEGIN {
-               RS="#[0-9]*";
-               aliroot=0;
-             } 
-             {
-               if ($3 ~ /Ali*/) aliroot=1; else aliroot=0;
-               gsub("#","",RT); 
-               if ($NF!="" && RT!="" && $3!="") print RT" "$3" "$NF" "1" "aliroot
-             }
-      ' 000*/cpass1/*/stacktrace* 2>/dev/null >> stacktrace.tree
+  stackTraceTree 000*/cpass0/*/stacktrace* > stacktrace_cpass0.tree
+  stackTraceTree 000*/cpass1/*/stacktrace* > stacktrace_cpass1.tree
 
   echo total numbers for the production:
   echo