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

Side by Side Diff: tests/spec2k/emit_perf_log.sh

Issue 7834028: Pulling back revision 6635 and 6634 due to broken builds. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 9 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/browser_tester/browser_tester.py » ('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 # Copyright (c) 2011 The Native Client Authors. All rights reserved. 3 # Copyright (c) 2011 The Native Client Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 set -o nounset 7 set -o nounset
8 set -o errexit 8 set -o errexit
9 9
10 #@ LogUserSysTime <time_file> <graph_label> <bench> <compiler_setup> 10 #@ LogUserSysTime <time_file> <graph_label> <bench> <compiler_setup>
11 #@ Take user+sys data from <time_file>, and log it for the Chrome perf bots. 11 #@ Take user+sys data from <time_file>, and log it for the Chrome perf bots.
12 #@ <time_file> should be a single line where column 1 and 2 are user/sys. 12 #@ <time_file> should be a single line where column 1 and 2 are user/sys.
13 LogUserSysTime() { 13 LogUserSysTime() {
14 local time_file=$1 14 local time_file=$1
15 local graph_label=$2 15 local graph_label=$2
16 local bench=$3 16 local bench=$3
17 local setup=$4 17 local setup=$4
18 # Generate a list of times "[x,y,z]". The chromium perf log parser 18 # Generate a set of times "{x,y,z}". The chromium perf log parser
19 # will know to average this list of times. 19 # will know to average this set of times.
20 local times="[$(awk '{print $1 + $2}' ${time_file} | \ 20 local time_set="{$(awk '{print $1 + $2}' ${time_file} | \
21 tr '\n' ',' | sed 's/,$//')]" 21 tr '\n' ',' | sed 's/,$//')}"
22 LogPerf ${graph_label} ${bench} ${setup} "${times}" "secs" 22 LogPerf ${graph_label} ${bench} ${setup} "${time_set}" "secs"
23 } 23 }
24 24
25 #@ LogGzippedSize <file_to_zip> <graph_label> <bench> <compiler_setup> 25 #@ LogGzippedSize <file_to_zip> <graph_label> <bench> <compiler_setup>
26 #@ Measure and log size of gzipped executable/bc files/etc. 26 #@ Measure and log size of gzipped executable/bc files/etc.
27 LogGzippedSize() { 27 LogGzippedSize() {
28 local file_to_zip=$1 28 local file_to_zip=$1
29 local graph_label=$2 29 local graph_label=$2
30 local bench=$3 30 local bench=$3
31 local setup=$4 31 local setup=$4
32 local tempsize=`gzip ${file_to_zip} -c | wc -c` 32 local tempsize=`gzip ${file_to_zip} -c | wc -c`
(...skipping 21 matching lines...) Expand all
54 54
55 [ $# = 0 ] && set -- help # Avoid reference to undefined $1. 55 [ $# = 0 ] && set -- help # Avoid reference to undefined $1.
56 56
57 if [ "$(type -t $1)" != "function" ]; then 57 if [ "$(type -t $1)" != "function" ]; then
58 Usage 58 Usage
59 echo "ERROR: unknown mode '$1'." >&2 59 echo "ERROR: unknown mode '$1'." >&2
60 exit 1 60 exit 1
61 fi 61 fi
62 62
63 eval "$@" 63 eval "$@"
OLDNEW
« no previous file with comments | « no previous file | tools/browser_tester/browser_tester.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698