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
5 # found in the LICENSE file.
10 #@ LogRealTime <time_file> <graph_label> <bench> <compiler_setup>
11 #@ Take wall time 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.
18 # Generate a list of times "[x,y,z]". The chromium perf log parser
19 # will know to average this list of times.
20 local times="[$(awk '{print $3}' ${time_file} | \
21 tr '\n' ',' | sed 's/,$//')]"
22 LogPerf ${graph_label} ${bench} ${setup} "${times}" "seconds"
25 #@ LogGzippedSize <file_to_zip> <graph_label> <bench> <compiler_setup>
26 #@ Measure and log size of gzipped executable/bc files/etc.
32 local tempsize=`gzip ${file_to_zip} -c | wc -c`
33 LogPerf ${graph_label} ${bench} ${setup} ${tempsize} "bytes"
36 #@ Emit a chrome perf log datapoint
39 #@ $3 :: compiler setup
40 #@ $4 :: measurement value
43 echo "RESULT $1_$2: $3= $4 $5"
46 ######################################################################
48 ######################################################################
50 # Print the usage message to stdout.
52 egrep "^#@" $0 | cut --bytes=3-
55 [ $# = 0 ] && set -- help # Avoid reference to undefined $1.
57 if [ "$(type -t $1)" != "function" ]; then
59 echo "ERROR: unknown mode '$1'." >&2