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

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

Issue 2933243003: Plot acknowledged bitrate when compiled with rtc_enable_bwe_test_logging. (Closed)
Patch Set: Created 3 years, 6 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 | « webrtc/modules/remote_bitrate_estimator/overuse_detector.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 # Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 # 3 #
4 # Use of this source code is governed by a BSD-style license 4 # Use of this source code is governed by a BSD-style license
5 # that can be found in the LICENSE file in the root of the source 5 # that can be found in the LICENSE file in the root of the source
6 # tree. An additional intellectual property rights grant can be found 6 # tree. An additional intellectual property rights grant can be found
7 # in the file PATENTS. All contributing project authors may 7 # in the file PATENTS. All contributing project authors may
8 # be found in the AUTHORS file in the root of the source tree. 8 # be found in the AUTHORS file in the root of the source tree.
9 9
10 # This script is used to plot simulation dynamics. The expected format is 10 # This script is used to plot simulation dynamics. The expected format is
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 receiver.AddSubplot(['Delay_ms_', 'Delay_ms'], "Time (s)", 130 receiver.AddSubplot(['Delay_ms_', 'Delay_ms'], "Time (s)",
131 "One-way delay (ms)") 131 "One-way delay (ms)")
132 receiver.AddSubplot(['Packet_Loss_'], "Time (s)", "Packet Loss Ratio") 132 receiver.AddSubplot(['Packet_Loss_'], "Time (s)", "Packet Loss Ratio")
133 133
134 kalman_state = Figure("KalmanState") 134 kalman_state = Figure("KalmanState")
135 kalman_state.AddSubplot(['kc', 'km'], "Time (s)", "Kalman gain") 135 kalman_state.AddSubplot(['kc', 'km'], "Time (s)", "Kalman gain")
136 kalman_state.AddSubplot(['slope_1/bps'], "Time (s)", "Slope") 136 kalman_state.AddSubplot(['slope_1/bps'], "Time (s)", "Slope")
137 kalman_state.AddSubplot(['var_noise'], "Time (s)", "Var noise") 137 kalman_state.AddSubplot(['var_noise'], "Time (s)", "Var noise")
138 138
139 detector_state = Figure("DetectorState") 139 detector_state = Figure("DetectorState")
140 detector_state.AddSubplot(['offset_ms'], "Time (s)", "Offset") 140 detector_state.AddSubplot(['T', 'threshold'], "Time (s)", "Offset")
141 detector_state.AddSubplot(['gamma_ms'], "Time (s)", "Gamma")
142 141
143 trendline_state = Figure("TrendlineState") 142 trendline_state = Figure("TrendlineState")
144 trendline_state.AddSubplot(["accumulated_delay_ms", "smoothed_delay_ms"], 143 trendline_state.AddSubplot(["accumulated_delay_ms", "smoothed_delay_ms"],
145 "Time (s)", "Delay (ms)") 144 "Time (s)", "Delay (ms)")
146 trendline_state.AddSubplot(["trendline_slope"], "Time (s)", "Slope") 145 trendline_state.AddSubplot(["trendline_slope"], "Time (s)", "Slope")
147 146
148 target_bitrate = Figure("TargetBitrate") 147 target_bitrate = Figure("TargetBitrate")
149 target_bitrate.AddSubplot(['target_bitrate_bps'], "Time (s)", "Bitrate (bps)") 148 target_bitrate.AddSubplot(['target_bitrate_bps', 'acknowledged_bitrate'],
149 "Time (s)", "Bitrate (bps)")
150 150
151 # Select which figures to plot here. 151 # Select which figures to plot here.
152 figures = [receiver, detector_state, trendline_state, target_bitrate] 152 figures = [receiver, detector_state, trendline_state, target_bitrate]
153 153
154 # Add samples to the figures. 154 # Add samples to the figures.
155 for line in sys.stdin: 155 for line in sys.stdin:
156 if line.startswith("[ RUN ]"): 156 if line.startswith("[ RUN ]"):
157 test_name = re.search(r'\.(\w+)', line).group(1) 157 test_name = re.search(r'\.(\w+)', line).group(1)
158 if line.startswith("PLOT"): 158 if line.startswith("PLOT"):
159 try: 159 try:
160 (var_name, ssrc, alg_name, time, value) = ParsePlotLine(line) 160 (var_name, ssrc, alg_name, time, value) = ParsePlotLine(line)
161 for f in figures: 161 for f in figures:
162 # The sample will be ignored bv the figures that don't need it. 162 # The sample will be ignored bv the figures that don't need it.
163 f.AddSample(var_name, ssrc, alg_name, time, value) 163 f.AddSample(var_name, ssrc, alg_name, time, value)
164 except ParsePlotLineException as e: 164 except ParsePlotLineException as e:
165 print e.reason 165 print e.reason
166 print e.line 166 print e.line
167 167
168 # Plot figures. 168 # Plot figures.
169 for f in figures: 169 for f in figures:
170 fig = plt.figure(f.name) 170 fig = plt.figure(f.name)
171 f.PlotFigure(fig) 171 f.PlotFigure(fig)
172 if SAVE_FIGURE: 172 if SAVE_FIGURE:
173 fig.savefig(test_name + f.name + ".png") 173 fig.savefig(test_name + f.name + ".png")
174 plt.show() 174 plt.show()
175 175
176 if __name__ == '__main__': 176 if __name__ == '__main__':
177 main() 177 main()
OLDNEW
« no previous file with comments | « webrtc/modules/remote_bitrate_estimator/overuse_detector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698