Merge pull request #10421 from ctiller/daily_and_hourly

Split performance profile job in two
diff --git a/tools/profiling/latency_profile/run_latency_profile.sh b/tools/jenkins/run_performance_profile_daily.sh
similarity index 86%
rename from tools/profiling/latency_profile/run_latency_profile.sh
rename to tools/jenkins/run_performance_profile_daily.sh
index 41423fc..f239fad 100755
--- a/tools/profiling/latency_profile/run_latency_profile.sh
+++ b/tools/jenkins/run_performance_profile_daily.sh
@@ -30,9 +30,7 @@
 
 set -ex
 
-cd $(dirname $0)/../../..
-
-CPUS=`python -c 'import multiprocessing; print multiprocessing.cpu_count()'`
+cd $(dirname $0)/../..
 
 # try to use pypy for generating reports
 # each trace dumps 7-8gig of text to disk, and processing this into a report is
@@ -44,9 +42,4 @@
   PYTHON=python2.7
 fi
 
-make CONFIG=opt memory_profile_test memory_profile_client memory_profile_server
-bins/opt/memory_profile_test
-bq load microbenchmarks.memory memory_usage.csv
-
-$PYTHON tools/run_tests/run_microbenchmark.py --collect summary perf latency --bigquery_upload
-
+$PYTHON tools/run_tests/run_microbenchmark.py --collect summary perf latency
diff --git a/tools/profiling/latency_profile/run_latency_profile.sh b/tools/jenkins/run_performance_profile_hourly.sh
similarity index 78%
copy from tools/profiling/latency_profile/run_latency_profile.sh
copy to tools/jenkins/run_performance_profile_hourly.sh
index 41423fc..dfcc2bb 100755
--- a/tools/profiling/latency_profile/run_latency_profile.sh
+++ b/tools/jenkins/run_performance_profile_hourly.sh
@@ -30,23 +30,12 @@
 
 set -ex
 
-cd $(dirname $0)/../../..
+cd $(dirname $0)/../..
 
 CPUS=`python -c 'import multiprocessing; print multiprocessing.cpu_count()'`
 
-# try to use pypy for generating reports
-# each trace dumps 7-8gig of text to disk, and processing this into a report is
-# heavyweight - so any speed boost is worthwhile
-# TODO(ctiller): consider rewriting report generation in C++ for performance
-if which pypy >/dev/null; then
-  PYTHON=pypy
-else
-  PYTHON=python2.7
-fi
-
-make CONFIG=opt memory_profile_test memory_profile_client memory_profile_server
+make CONFIG=opt memory_profile_test memory_profile_client memory_profile_server -j $CPUS
 bins/opt/memory_profile_test
 bq load microbenchmarks.memory memory_usage.csv
 
-$PYTHON tools/run_tests/run_microbenchmark.py --collect summary perf latency --bigquery_upload
-
+tools/run_tests/run_microbenchmark.py --collect summary --bigquery_upload