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

Side by Side Diff: makeplots.sh

Issue 1393233002: Mac Energy Test Harness/Framework Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Snapshot of scripts for http://crbug.com/391646 Created 5 years, 2 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 | « chrome/test/base/testing_profile.cc ('k') | run_a_bunch.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/bin/bash -x
2 MAX_INDEX=2
3 MAX_INDEX=0
4 KEY=( "throbber" "idle" "cursor" )
5 TITLE=( "Throbber" "Idle" "Cursor" )
6
7 COCOA=( 1 2 3 )
8 VIEWS=( 1 2 1 )
9
10 TRUNK_KEY=cocoa
11 TRUNK_KEY=slowtab
12 COMP_KEY=views
13
14 TRUNK_TITLE=Cocoa
15 TRUNK_TITLE=master
16 COMP_TITLE=Views
17 COMP_TITLE=crrev/1393193002
18
19 TYPE=eps # svg #or png
20 TERM_PARAMS="$TYPE" # works for svg and png
21 TERM_PARAMS="postscript eps color enhanced size 6in,4.2in"
22
23 function eps2png() {
24 gs -dSAFER -dBATCH -dNOPAUSE -r600 -sDEVICE=pngalpha -dEPSCrop -sOutputFile="$ {1/%.eps/.png}" "${1}"
25 }
26
27 for i in `seq 0 $MAX_INDEX` ; do
28 output="${KEY[i]}-timeline.$TYPE"
29 title="${TITLE[i]} Timeline"
30 cocoa="${TRUNK_KEY}-${KEY[i]}-${COCOA[i]}.txt"
31 views="${COMP_KEY}-${KEY[i]}-${VIEWS[i]}.txt"
32
33 gnuplot <<EOF
34 set terminal $TERM_PARAMS
35 set key autotitle columnhead
36 set datafile separator ','
37 set output "$output"
38 set ylabel "Watts"
39 set xlabel "RDTSC"
40 set title "$title"
41 plot \
42 "$views" using 1:2 with lines title "Processor Watts $COMP_TITLE", \
43 "$cocoa" using 1:2 with lines title "Processor Watts $TRUNK_TITLE", \
44 "$views" using 1:3 with lines title "IA Watts $COMP_TITLE", \
45 "$cocoa" using 1:3 with lines title "IA Watts $TRUNK_TITLE"
46 EOF
47
48 [ $TYPE = eps ] && eps2png "${output}"
49
50 # Runs plot
51 output="${KEY[i]}-runs.$TYPE"
52 title="${TITLE[i]} Runs"
53 cocoa="${TRUNK_KEY}-${KEY[i]}-log.txt"
54 views="${COMP_KEY}-${KEY[i]}-log.txt"
55
56 gnuplot <<EOF
57 set terminal $TERM_PARAMS
58 set key autotitle columnhead
59 set datafile separator ','
60 set output "$output"
61 set title "$title"
62 set timefmt "%Y-%m-%d %H:%M:%S"
63 set xdata time
64 set ylabel "Watts"
65 set xlabel "Wall Clock"
66 plot \
67 "$views" using 1:2:3 with yerrorbars linetype 1 title '', \
68 '' using 1:2 with lines linetype 1 title "$COMP_TITLE $title Processor Watts", \
69 "$cocoa" using 1:2:3 with yerrorbars linetype 2 title '', \
70 '' using 1:2 with lines linetype 2 title "$TRUNK_TITLE $title Processor Watts", \
71 "$views" using 1:4:5 with yerrorbars linetype 3 title '', \
72 '' using 1:4 with lines linetype 3 title "$COMP_TITLE $title IA Watts", \
73 "$cocoa" using 1:4:5 with yerrorbars linetype 4 title '', \
74 '' using 1:4 with lines linetype 4 title "$TRUNK_TITLE $title IA Watts"
75 EOF
76
77 [ $TYPE = eps ] && eps2png "${output}"
78
79 done
80
OLDNEW
« no previous file with comments | « chrome/test/base/testing_profile.cc ('k') | run_a_bunch.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698