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

Side by Side Diff: webrtc/tools/py_event_log_analyzer/rtp_analyzer.py

Issue 2357883002: Avoid plotting data of different length in rtp log plotting tool. (Closed)
Patch Set: this is the quick fix Created 4 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
« no previous file with comments | « no previous file | 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 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 1 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
2 # 2 #
3 # Use of this source code is governed by a BSD-style license 3 # Use of this source code is governed by a BSD-style license
4 # that can be found in the LICENSE file in the root of the source 4 # that can be found in the LICENSE file in the root of the source
5 # tree. An additional intellectual property rights grant can be found 5 # tree. An additional intellectual property rights grant can be found
6 # in the file PATENTS. All contributing project authors may 6 # in the file PATENTS. All contributing project authors may
7 # be found in the AUTHORS file in the root of the source tree. 7 # be found in the AUTHORS file in the root of the source tree.
8 8
9 """Displays statistics and plots graphs from RTC protobuf dump.""" 9 """Displays statistics and plots graphs from RTC protobuf dump."""
10 10
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 start_ms = self.data_points[0].real_send_time_ms 252 start_ms = self.data_points[0].real_send_time_ms
253 stop_ms = self.data_points[-1].real_send_time_ms 253 stop_ms = self.data_points[-1].real_send_time_ms
254 time_axis = numpy.arange(start_ms / 1000, stop_ms / 1000, 254 time_axis = numpy.arange(start_ms / 1000, stop_ms / 1000,
255 RTPStatistics.PLOT_RESOLUTION_MS / 1000) 255 RTPStatistics.PLOT_RESOLUTION_MS / 1000)
256 256
257 delay = calculate_delay(start_ms, stop_ms, 257 delay = calculate_delay(start_ms, stop_ms,
258 RTPStatistics.PLOT_RESOLUTION_MS, 258 RTPStatistics.PLOT_RESOLUTION_MS,
259 self.data_points) 259 self.data_points)
260 260
261 plt.figure(1) 261 plt.figure(1)
262 plt.plot(time_axis, delay) 262 plt.plot(time_axis, delay[:len(time_axis)])
263 plt.xlabel("Send time [s]") 263 plt.xlabel("Send time [s]")
264 plt.ylabel("Relative transport delay [ms]") 264 plt.ylabel("Relative transport delay [ms]")
265 265
266 plt.figure(2) 266 plt.figure(2)
267 plt.plot(time_axis[:len(self.smooth_bw_kbps)], self.smooth_bw_kbps) 267 plt.plot(time_axis[:len(self.smooth_bw_kbps)], self.smooth_bw_kbps)
268 plt.xlabel("Send time [s]") 268 plt.xlabel("Send time [s]")
269 plt.ylabel("Bandwidth [kbps]") 269 plt.ylabel("Bandwidth [kbps]")
270 270
271 plt.show() 271 plt.show()
272 272
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 print("Statistics:") 331 print("Statistics:")
332 rtp_stats.print_sequence_number_statistics() 332 rtp_stats.print_sequence_number_statistics()
333 rtp_stats.estimate_frequency(options.query_sample_rate) 333 rtp_stats.estimate_frequency(options.query_sample_rate)
334 rtp_stats.print_duration_statistics() 334 rtp_stats.print_duration_statistics()
335 rtp_stats.remove_reordered() 335 rtp_stats.remove_reordered()
336 rtp_stats.compute_bandwidth() 336 rtp_stats.compute_bandwidth()
337 rtp_stats.plot_statistics() 337 rtp_stats.plot_statistics()
338 338
339 if __name__ == "__main__": 339 if __name__ == "__main__":
340 main() 340 main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698