[VOL-2992] Capturing both .png and .pprof output for meaningful endpoints

Change-Id: Ib17b9835112e3b5bbb13069fa9c04489f9b1ab79
diff --git a/jjb/pipeline/voltha-scale-test.groovy b/jjb/pipeline/voltha-scale-test.groovy
index 675bfb9..47e4549 100644
--- a/jjb/pipeline/voltha-scale-test.groovy
+++ b/jjb/pipeline/voltha-scale-test.groovy
@@ -229,15 +229,16 @@
 i=0
 while [[ true ]]; do
   ((i++))
-  go tool pprof -png http://127.0.0.1:6060/debug/pprof/heap > $WORKSPACE/logs/pprof/rw-core-heap-\\$i.png
-  go tool pprof -png http://127.0.0.1:6060/debug/pprof/goroutine > $WORKSPACE/logs/pprof/rw-core-goroutine-\\$i.png
-  go tool pprof -png http://127.0.0.1:6060/debug/pprof/block > $WORKSPACE/logs/pprof/rw-core-block-\\$i.png
-  go tool pprof -png http://127.0.0.1:6060/debug/pprof/mutex > $WORKSPACE/logs/pprof/rw-core-mutex-\\$i.png
+  ts=$(date +"%T")
+  go tool pprof -png http://127.0.0.1:6060/debug/pprof/heap > $WORKSPACE/logs/pprof/rw-core-heap-\\$i-\\$ts.png
+  go tool pprof -png http://127.0.0.1:6060/debug/pprof/goroutine > $WORKSPACE/logs/pprof/rw-core-goroutine-\\$i-\\$ts.png
+  curl -o $WORKSPACE/logs/pprof/rw-core-profile-\\$i-\\$ts.pprof http://127.0.0.1:6060/debug/pprof/profile?seconds=10
+  go tool pprof -png $WORKSPACE/logs/pprof/rw-core-profile-\\$i-\\$ts.pprof > $WORKSPACE/logs/pprof/rw-core-profile-\\$i-\\$ts.png
 
-  go tool pprof -png http://127.0.0.1:6061/debug/pprof/heap > $WORKSPACE/logs/pprof/openolt-heap-\\$i.png
-  go tool pprof -png http://127.0.0.1:6061/debug/pprof/goroutine > $WORKSPACE/logs/pprof/openolt-goroutine-\\$i.png
-  go tool pprof -png http://127.0.0.1:6061/debug/pprof/block > $WORKSPACE/logs/pprof/openolt-block-\\$i.png
-  go tool pprof -png http://127.0.0.1:6061/debug/pprof/mutex > $WORKSPACE/logs/pprof/openolt-mutex-\\$i.png
+  go tool pprof -png http://127.0.0.1:6061/debug/pprof/heap > $WORKSPACE/logs/pprof/openolt-heap-\\$i-\\$ts.png
+  go tool pprof -png http://127.0.0.1:6061/debug/pprof/goroutine > $WORKSPACE/logs/pprof/openolt-goroutine-\\$i-\\$ts.png
+  curl -o $WORKSPACE/logs/pprof/openolt-profile-\\$i-\\$ts.pprof http://127.0.0.1:6061/debug/pprof/profile?seconds=10
+  go tool pprof -png $WORKSPACE/logs/pprof/openolt-profile-\\$i-\\$ts.pprof > $WORKSPACE/logs/pprof/openolt-profile-\\$i-\\$ts.png
 
   sleep 10
 done
@@ -268,7 +269,8 @@
             fi
 
             if [ ${provisionSubscribers} = false ] ; then
-              ROBOT_PARAMS+="-e provision -e flow-after "
+              # if we're not considering subscribers then we don't care about authentication either
+              ROBOT_PARAMS+="-e authentication -e provision -e flow-after "
             fi
 
             if [ ${withFlows} = false ] ; then
@@ -306,26 +308,6 @@
           fi
         fi
       '''
-      // get some data from pprof
-      sh '''
-      if [ ${withProfiling} = true ] ; then
-        curl -o $WORKSPACE/logs/pprof/rw-core-goroutine.pprof http://127.0.0.1:6060/debug/pprof/goroutine
-        curl -o $WORKSPACE/logs/pprof/rw-core-heap.pprof http://127.0.0.1:6060/debug/pprof/heap
-        curl -o $WORKSPACE/logs/pprof/rw-core-threadcreate.pprof http://127.0.0.1:6060/debug/pprof/threadcreate
-        curl -o $WORKSPACE/logs/pprof/rw-core-block.pprof http://127.0.0.1:6060/debug/pprof/block
-        curl -o $WORKSPACE/logs/pprof/rw-core-mutex.pprof http://127.0.0.1:6060/debug/pprof/mutex
-        curl -o $WORKSPACE/logs/pprof/rw-core-profile.pprof http://127.0.0.1:6060/debug/pprof/profile
-        curl -o $WORKSPACE/logs/pprof/rw-core-trace.trace http://127.0.0.1:6060/debug/pprof/trace?minutes=10
-
-        curl -o $WORKSPACE/logs/pprof/openolt-goroutine.pprof http://127.0.0.1:6061/debug/pprof/goroutine
-        curl -o $WORKSPACE/logs/pprof/openolt-heap.pprof http://127.0.0.1:6061/debug/pprof/heap
-        curl -o $WORKSPACE/logs/pprof/openolt-threadcreate.pprof http://127.0.0.1:6061/debug/pprof/threadcreate
-        curl -o $WORKSPACE/logs/pprof/openolt-block.pprof http://127.0.0.1:6061/debug/pprof/block
-        curl -o $WORKSPACE/logs/pprof/openolt-mutex.pprof http://127.0.0.1:6061/debug/pprof/mutex
-        curl -o $WORKSPACE/logs/pprof/openolt-profile.pprof http://127.0.0.1:6061/debug/pprof/profile
-        curl -o $WORKSPACE/logs/pprof/openolt-trace.trace http://127.0.0.1:6061/debug/pprof/trace?minutes=10
-      fi
-      '''
       plot([
         csvFileName: 'scale-test.csv',
         csvSeries: [