| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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() |
| OLD | NEW |