Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(915)

Side by Side Diff: cluster_telemetry/telemetry_slave_scripts/vm_run_telemetry.sh

Issue 231433003: Repeat Chromium Tryserver page_set runs to reduce variance. (Closed) Base URL: https://skia.googlesource.com/buildbot.git@master
Patch Set: Move to cluster_telemetry directory Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cluster_telemetry/csv_merger.py ('k') | cluster_telemetry/test_data/csv_merger/expected_output » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # 2 #
3 # Runs all steps in vm_setup_slave.sh, calls run_multipage_benchmarks and copies 3 # Runs all steps in vm_setup_slave.sh, calls run_multipage_benchmarks and copies
4 # the output (if any) to Google Storage. 4 # the output (if any) to Google Storage.
5 # 5 #
6 # The script should be run from the cluster-telemetry-slave GCE instance's 6 # The script should be run from the cluster-telemetry-slave GCE instance's
7 # /b/skia-repo/buildbot/cluster_telemetry/telemetry_slave_scripts 7 # /b/skia-repo/buildbot/cluster_telemetry/telemetry_slave_scripts
8 # directory. 8 # directory.
9 # 9 #
10 # Copyright 2013 Google Inc. All Rights Reserved. 10 # Copyright 2013 Google Inc. All Rights Reserved.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 if [ $? -eq 1 ]; then 54 if [ $? -eq 1 ]; then
55 gsutil cp gs://chromium-skia-gm/telemetry/webpages_archive/slave$SLAVE_NUM/$PA GESETS_TYPE/* \ 55 gsutil cp gs://chromium-skia-gm/telemetry/webpages_archive/slave$SLAVE_NUM/$PA GESETS_TYPE/* \
56 /b/storage/webpages_archive/$PAGESETS_TYPE 56 /b/storage/webpages_archive/$PAGESETS_TYPE
57 fi 57 fi
58 58
59 if [[ ! -z "$WHITELIST_GS_LOCATION" ]]; then 59 if [[ ! -z "$WHITELIST_GS_LOCATION" ]]; then
60 # Copy the whitelist from Google Storage to /tmp. 60 # Copy the whitelist from Google Storage to /tmp.
61 gsutil cp $WHITELIST_GS_LOCATION /tmp/$WHITELIST_FILE 61 gsutil cp $WHITELIST_GS_LOCATION /tmp/$WHITELIST_FILE
62 fi 62 fi
63 63
64 # The number of times to repeate telemetry page_set runs.
65 REPEAT_TELEMETRY_RUNS=${REPEAT_TELEMETRY_RUNS:=3}
66
64 if [ "$TELEMETRY_BENCHMARK" == "skpicture_printer" ]; then 67 if [ "$TELEMETRY_BENCHMARK" == "skpicture_printer" ]; then
65 # Clean and create the skp output directory. 68 # Clean and create the skp output directory.
66 sudo chown -R chrome-bot:chrome-bot /b/storage/skps/$PAGESETS_TYPE/$CHROMIUM_B UILD_DIR 69 sudo chown -R chrome-bot:chrome-bot /b/storage/skps/$PAGESETS_TYPE/$CHROMIUM_B UILD_DIR
67 rm -rf /b/storage/skps/$PAGESETS_TYPE/$CHROMIUM_BUILD_DIR 70 rm -rf /b/storage/skps/$PAGESETS_TYPE/$CHROMIUM_BUILD_DIR
68 mkdir -p /b/storage/skps/$PAGESETS_TYPE/$CHROMIUM_BUILD_DIR/ 71 mkdir -p /b/storage/skps/$PAGESETS_TYPE/$CHROMIUM_BUILD_DIR/
69 EXTRA_ARGS="--skp-outdir=/b/storage/skps/$PAGESETS_TYPE/$CHROMIUM_BUILD_DIR/ $ EXTRA_ARGS" 72 EXTRA_ARGS="--skp-outdir=/b/storage/skps/$PAGESETS_TYPE/$CHROMIUM_BUILD_DIR/ $ EXTRA_ARGS"
73 # Only do one run for SKPs.
74 REPEAT_TELEMETRY_RUNS=1
70 fi 75 fi
71 76
72 if [ "$TELEMETRY_BENCHMARK" == "smoothness" ]; then 77 if [ "$TELEMETRY_BENCHMARK" == "smoothness" ]; then
73 # A synthetic scroll needs to be able to output at least two frames. Make the 78 # A synthetic scroll needs to be able to output at least two frames. Make the
74 # viewport size smaller than the page size. 79 # viewport size smaller than the page size.
75 EXTRA_BROWSER_ARGS="--window-size=1280,512" 80 EXTRA_BROWSER_ARGS="--window-size=1280,512"
76 fi 81 fi
77 82
78 OUTPUT_DIR=/b/storage/telemetry_outputs/$RUN_ID 83 OUTPUT_DIR=/b/storage/telemetry_outputs/$RUN_ID
79 mkdir -p $OUTPUT_DIR 84 mkdir -p $OUTPUT_DIR
80 85
86 # Change all local page_sets to use 0 wait seconds.
87 find /home/default/storage/page_sets/$PAGESETS_TYPE/ -type f -exec sed -i "s/\"s econds\": 5/\"seconds\": 0/g" {} \;
88
89 # Start the timer.
90 TIMER="$(date +%s)"
91
81 for page_set in /b/storage/page_sets/$PAGESETS_TYPE/*.json; do 92 for page_set in /b/storage/page_sets/$PAGESETS_TYPE/*.json; do
82 if [[ -f $page_set ]]; then 93 if [[ -f $page_set ]]; then
83 if [[ ! -z "$WHITELIST_GS_LOCATION" ]]; then 94 if [[ ! -z "$WHITELIST_GS_LOCATION" ]]; then
84 check_pageset_url_in_whitelist $page_set /tmp/$WHITELIST_FILE 95 check_pageset_url_in_whitelist $page_set /tmp/$WHITELIST_FILE
85 if [ $? -eq 1 ]; then 96 if [ $? -eq 1 ]; then
86 # The current page set URL does not exist in the whitelist, move on to 97 # The current page set URL does not exist in the whitelist, move on to
87 # the next one. 98 # the next one.
88 echo "========== Skipping $page_set because it is not in the whitelist = =========" 99 echo "========== Skipping $page_set because it is not in the whitelist = ========="
89 continue 100 continue
90 fi 101 fi
91 fi 102 fi
92 echo "========== Processing $page_set ==========" 103 echo "========== Processing $page_set =========="
93 page_set_basename=`basename $page_set` 104 page_set_basename=`basename $page_set`
94 check_and_run_xvfb 105 check_and_run_xvfb
95 if [ "$TELEMETRY_BENCHMARK" != "skpicture_printer" ]; then 106 if [ "$TELEMETRY_BENCHMARK" != "skpicture_printer" ]; then
96 # Need to capture output for all benchmarks except skpicture_printer. 107 # Need to capture output for all benchmarks except skpicture_printer.
97 OUTPUT_DIR_ARG="-o $OUTPUT_DIR/${RUN_ID}.${page_set_basename}" 108 OUTPUT_DIR_ARG="-o $OUTPUT_DIR/${RUN_ID}.${page_set_basename}"
98 fi 109 fi
99 echo "=== Running: eval sudo DISPLAY=:0 timeout 300 src/tools/perf/run_measu rement --extra-browser-args=\"--disable-setuid-sandbox --enable-software-composi ting $EXTRA_BROWSER_ARGS\" --browser-executable=/b/storage/chromium-builds/${CHR OMIUM_BUILD_DIR}/chrome --browser=exact $TELEMETRY_BENCHMARK $page_set $EXTRA_AR GS $OUTPUT_DIR_ARG ===" 110 echo "=== Running: eval sudo DISPLAY=:0 timeout 300 src/tools/perf/run_measu rement --extra-browser-args=\"--disable-setuid-sandbox --enable-software-composi ting $EXTRA_BROWSER_ARGS\" --browser-executable=/b/storage/chromium-builds/${CHR OMIUM_BUILD_DIR}/chrome --browser=exact $TELEMETRY_BENCHMARK $page_set $EXTRA_AR GS $OUTPUT_DIR_ARG ==="
100 eval sudo DISPLAY=:0 timeout 300 src/tools/perf/run_measurement --extra-brow ser-args=\"--disable-setuid-sandbox --enable-software-compositing\" --browser-ex ecutable=/b/storage/chromium-builds/${CHROMIUM_BUILD_DIR}/chrome --browser=exact $TELEMETRY_BENCHMARK $page_set $EXTRA_ARGS $OUTPUT_DIR_ARG 111
101 sudo chown chrome-bot:chrome-bot $OUTPUT_DIR/${RUN_ID}.${page_set_basename} 112 for current_run in `seq 1 $REPEAT_TELEMETRY_RUNS`;
113 do
114 echo "This is run number $current_run"
115 eval sudo DISPLAY=:0 timeout 300 src/tools/perf/run_measurement --extra-br owser-args=\"--disable-setuid-sandbox --enable-software-compositing\" --browser- executable=/b/storage/chromium-builds/${CHROMIUM_BUILD_DIR}/chrome --browser=exa ct $TELEMETRY_BENCHMARK $page_set $EXTRA_ARGS ${OUTPUT_DIR_ARG}.${current_run}
116 sudo chown chrome-bot:chrome-bot $OUTPUT_DIR/${RUN_ID}.${page_set_basename }.${current_run}
117 done
118
102 if [ $? -eq 124 ]; then 119 if [ $? -eq 124 ]; then
103 echo "========== $page_set timed out! ==========" 120 echo "========== $page_set timed out! =========="
104 else 121 else
105 echo "========== Done with $page_set ==========" 122 echo "========== Done with $page_set =========="
106 fi 123 fi
107 fi 124 fi
108 done 125 done
109 126
127 TELEMETRY_TIME="$(($(date +%s)-TIMER))"
128 echo "Going through all page_sets took $TELEMETRY_TIME seconds"
129
110 # Consolidate outputs from all page sets into a single file with special 130 # Consolidate outputs from all page sets into a single file with special
111 # handling for CSV files. 131 # handling for CSV files.
112 mkdir $OUTPUT_DIR/${RUN_ID} 132 mkdir $OUTPUT_DIR/${RUN_ID}
113 133
114 for output in $OUTPUT_DIR/${RUN_ID}.*; do 134 for output in $OUTPUT_DIR/${RUN_ID}.*; do
115 if [[ "$EXTRA_ARGS" == *--output-format=csv* ]]; then 135 if [[ "$EXTRA_ARGS" == *--output-format=csv* ]]; then
116 csv_basename=`basename $output` 136 csv_basename=`basename $output`
117 mv $output $OUTPUT_DIR/${RUN_ID}/${csv_basename}.csv 137 mv $output $OUTPUT_DIR/${RUN_ID}/${csv_basename}.csv
118 else 138 else
119 cat $output >> $OUTPUT_DIR/output.${RUN_ID} 139 cat $output >> $OUTPUT_DIR/output.${RUN_ID}
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 TIMESTAMP=`date +%s` 195 TIMESTAMP=`date +%s`
176 echo $TIMESTAMP > /tmp/$TIMESTAMP 196 echo $TIMESTAMP > /tmp/$TIMESTAMP
177 cp /tmp/$TIMESTAMP /b/storage/skps/$PAGESETS_TYPE/$CHROMIUM_BUILD_DIR/TIMESTAM P 197 cp /tmp/$TIMESTAMP /b/storage/skps/$PAGESETS_TYPE/$CHROMIUM_BUILD_DIR/TIMESTAM P
178 gsutil cp /tmp/$TIMESTAMP gs://chromium-skia-gm/telemetry/skps/slave$SLAVE_NUM /$PAGESETS_TYPE/$CHROMIUM_BUILD_DIR/TIMESTAMP 198 gsutil cp /tmp/$TIMESTAMP gs://chromium-skia-gm/telemetry/skps/slave$SLAVE_NUM /$PAGESETS_TYPE/$CHROMIUM_BUILD_DIR/TIMESTAMP
179 rm /tmp/$TIMESTAMP 199 rm /tmp/$TIMESTAMP
180 fi 200 fi
181 201
182 # Clean up logs and the worker file. 202 # Clean up logs and the worker file.
183 rm -rf ${OUTPUT_DIR}* 203 rm -rf ${OUTPUT_DIR}*
184 delete_worker_file TELEMETRY_${RUN_ID} 204 delete_worker_file TELEMETRY_${RUN_ID}
OLDNEW
« no previous file with comments | « cluster_telemetry/csv_merger.py ('k') | cluster_telemetry/test_data/csv_merger/expected_output » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698