OLD | NEW |
1 # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 1 # Copyright (c) 2017 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 """Plots statistics from WebRTC integration test logs. | 9 """Plots statistics from WebRTC integration test logs. |
10 | 10 |
11 Usage: $ python plot_webrtc_test_logs.py filename.txt | 11 Usage: $ python plot_webrtc_test_logs.py filename.txt |
12 """ | 12 """ |
13 | 13 |
14 import numpy | 14 import numpy |
15 import sys | 15 import sys |
16 import re | 16 import re |
17 | 17 |
18 import matplotlib.pyplot as plt | 18 import matplotlib.pyplot as plt |
19 | 19 |
20 # Log events. | 20 # Log events. |
21 EVENT_START = 'RUN ] CodecSettings/PlotVideoProcessorIntegrationTest.' | 21 EVENT_START = \ |
22 EVENT_END = 'OK ] CodecSettings/PlotVideoProcessorIntegrationTest.' | 22 'RUN ] CodecSettings/VideoProcessorIntegrationTestParameterized.' |
| 23 EVENT_END = 'OK ] CodecSettings/VideoProcessorIntegrationTestParameterized.' |
23 | 24 |
24 # Metrics to plot, tuple: (name to parse in file, label to use when plotting). | 25 # Metrics to plot, tuple: (name to parse in file, label to use when plotting). |
25 BITRATE = ('Target bitrate', 'target bitrate (kbps)') | 26 BITRATE = ('Target bitrate', 'target bitrate (kbps)') |
26 WIDTH = ('Width', 'width') | 27 WIDTH = ('Width', 'width') |
27 HEIGHT = ('Height', 'height') | 28 HEIGHT = ('Height', 'height') |
28 FILENAME = ('Filename', 'clip') | 29 FILENAME = ('Filename', 'clip') |
29 CODEC_TYPE = ('Codec type', 'Codec') | 30 CODEC_TYPE = ('Codec type', 'Codec') |
30 ENCODER_IMPLEMENTATION_NAME = ('Encoder implementation name', 'enc name') | 31 ENCODER_IMPLEMENTATION_NAME = ('Encoder implementation name', 'enc name') |
31 DECODER_IMPLEMENTATION_NAME = ('Decoder implementation name', 'dec name') | 32 DECODER_IMPLEMENTATION_NAME = ('Decoder implementation name', 'dec name') |
32 CODEC_IMPLEMENTATION_NAME = ('Codec implementation name', 'codec name') | 33 CODEC_IMPLEMENTATION_NAME = ('Codec implementation name', 'codec name') |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 plt.rcParams["figure.figsize"] = figsize | 443 plt.rcParams["figure.figsize"] = figsize |
443 | 444 |
444 PlotFigure(sub_keys, y_metrics, x_metric, metrics, | 445 PlotFigure(sub_keys, y_metrics, x_metric, metrics, |
445 GetTitle(filename, setting2)) | 446 GetTitle(filename, setting2)) |
446 | 447 |
447 plt.show() | 448 plt.show() |
448 | 449 |
449 | 450 |
450 if __name__ == '__main__': | 451 if __name__ == '__main__': |
451 main() | 452 main() |
OLD | NEW |