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

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/test/plot_dynamics.sh

Issue 1253473004: BWE Simulation Framework: Standard plot logging (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added missing comma in python script Created 5 years, 5 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
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 3 # Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
4 # 4 #
5 # Use of this source code is governed by a BSD-style license 5 # Use of this source code is governed by a BSD-style license
6 # that can be found in the LICENSE file in the root of the source 6 # that can be found in the LICENSE file in the root of the source
7 # tree. An additional intellectual property rights grant can be found 7 # tree. An additional intellectual property rights grant can be found
8 # in the file PATENTS. All contributing project authors may 8 # in the file PATENTS. All contributing project authors may
9 # be found in the AUTHORS file in the root of the source tree. 9 # be found in the AUTHORS file in the root of the source tree.
10 10
(...skipping 16 matching lines...) Expand all
27 27
28 # Plot dynamics. 28 # Plot dynamics.
29 function gen_gnuplot_input { 29 function gen_gnuplot_input {
30 colors=(a7001f 0a60c2 b2582b 21a66c d6604d 4393c3 f4a582 92c5de edcbb7 b1c5d0) 30 colors=(a7001f 0a60c2 b2582b 21a66c d6604d 4393c3 f4a582 92c5de edcbb7 b1c5d0)
31 plots=$(echo "$log" | grep "^PLOT") 31 plots=$(echo "$log" | grep "^PLOT")
32 figures=($(echo "$plots" | cut -f 2 | sort | uniq)) 32 figures=($(echo "$plots" | cut -f 2 | sort | uniq))
33 33
34 for figure in "${figures[@]}" ; do 34 for figure in "${figures[@]}" ; do
35 data_sets=$(echo "$plots" | grep "^PLOT.$figure" | cut -f 3 | sort | uniq) 35 data_sets=$(echo "$plots" | grep "^PLOT.$figure" | cut -f 3 | sort | uniq)
36 linetypes=($(echo "$data_sets" | grep "#" | cut -d '#' -f 2 | \ 36 linetypes=($(echo "$data_sets" | grep "#" | cut -d '#' -f 2 | \
37 cut -d ' ' -f 1)) 37 cut -d ' ' -f 1 | cut -d '@' -f 1))
38 delay_line=$(echo "$linetypes" | grep "d")
39
38 echo "reset; " 40 echo "reset; "
39 echo "set terminal wxt $figure size 1440,900 font \"Arial,9\"; " 41 echo "set terminal wxt $figure size 1440,900 font \"Arial,9\"; "
40 echo "set xlabel \"Seconds\"; " 42 echo "set xlabel \"Seconds\"; "
41 if (( "${#linetypes[@]}" > "0" )); then 43
44 if (( "${#delay_line}" > "0" )); then
stefan-webrtc 2015/07/24 09:30:43 Previously, this checked if we had more than a sin
magalhaesc 2015/07/24 13:51:40 Adopting back the convention: 1 - left side axis 2
42 echo "set ylabel 'bitrate (kbps)';" 45 echo "set ylabel 'bitrate (kbps)';"
43 echo "set ytics nomirror;" 46 echo "set ytics nomirror;"
44 echo "set y2label 'time delta (ms)';" 47 echo "set y2label 'time delta (ms)';"
45 echo "set y2tics nomirror;" 48 echo "set y2tics nomirror;"
46 fi 49 fi
47 echo -n "plot " 50 echo -n "plot "
48 i=0 51 i=0
49 for set in $data_sets ; do 52 for set in $data_sets ; do
50 (( i++ )) && echo -n "," 53 (( i++ )) && echo -n ","
51 echo -n "'-' with " 54 echo -n "'-' with "
52 echo -n "linespoints " 55 echo -n "linespoints "
53 echo -n "ps 0.5 " 56 echo -n "ps 0.5 "
54 echo -n "lc rgbcolor \"#${colors[$(($i % 10))]}\" " 57 echo -n "lc rgbcolor \"#${colors[$(($i % 10))]}\" "
55 if (( "${#linetypes[@]}" > "0" )); then 58 if (( "${#linetypes[@]}" > "0" )); then
56 if (( "$i" <= "${#linetypes[@]}" )); then 59 delay_line=($(echo "$set" | grep "#" | cut -d '#' -f 2 | \
57 echo -n "axes x1y${linetypes[$i - 1]} " 60 cut -d ' ' -f 1 | cut -d '@' -f 1 | grep "d"))
61 if (( "${#delay_line}" > "0" )); then
62 # 'd' stands for delay, plot scaled on the right side.
63 echo -n "axes x1y2 "
stefan-webrtc 2015/07/24 09:30:43 Previously, this checked if we had more than a sin
magalhaesc 2015/07/24 13:51:40 Adopting back the convention: 1 - left side axis 2
58 else 64 else
59 # If no line type is specified, but line types are used, we will 65 # If no line type is specified, but line types are used, we will
60 # default to the bitrate axis. 66 # default to scale on the left side.
61 echo -n "axes x1y1 " 67 echo -n "axes x1y1 "
62 fi 68 fi
63 fi 69 fi
64 echo -n "title \"$set\" " 70 echo -n "title \"$set\" "
65 done 71 done
66 echo 72 echo
67 for set in $data_sets ; do 73 for set in $data_sets ; do
68 echo "$log" | grep "^PLOT.$figure.$set" | cut -f 4,5 74 echo "$log" | grep "^PLOT.$figure.$set" | cut -f 4,5
69 echo "e" 75 echo "e"
70 done 76 done
71 done 77 done
72 } 78 }
73 gen_gnuplot_input | gnuplot -persist 79 gen_gnuplot_input | gnuplot -persist
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698