|
webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
Functions | |
| def | ParseSetting (filename, setting) |
| def | ParseMetrics (filename, setting1, setting2) |
| def | TryFindMetric (parsed, line, f) |
| def | GetMetric (name, string) |
| def | StringToFloat (value) |
| def | Plot (y_metric, x_metric, metrics) |
| def | PlotFigure (settings, y_metrics, x_metric, metrics, title) |
| def | GetTitle (filename) |
| def | ToString (input_list) |
| def | ToStringWithoutMetric (input_list, metric) |
| def | GetIdx (text_list) |
| def | main () |
Variables | |
| string | EVENT_START = 'RUN ] CodecSettings/PlotVideoProcessorIntegrationTest.' |
| string | EVENT_END = 'OK ] CodecSettings/PlotVideoProcessorIntegrationTest.' |
| tuple | BITRATE = ('Target Bitrate', 'bitrate (kbps)') |
| tuple | WIDTH = ('Width', 'width') |
| tuple | HEIGHT = ('Height', 'height') |
| tuple | FILENAME = ('Filename', 'clip') |
| tuple | CODEC_TYPE = ('Codec type', 'Codec') |
| tuple | ENCODER_IMPLEMENTATION_NAME = ('Encoder implementation name', 'enc name') |
| tuple | DECODER_IMPLEMENTATION_NAME = ('Decoder implementation name', 'dec name') |
| tuple | NUM_FRAMES = ('Total # of frames', 'num frames') |
| tuple | CORES = ('#CPU cores used', 'CPU cores used') |
| tuple | DENOISING = ('Denoising', 'denoising') |
| tuple | RESILIENCE = ('Resilience', 'resilience') |
| tuple | ERROR_CONCEALMENT = ('Error concealment', 'error concealment') |
| tuple | QP = ('Average QP', 'avg QP') |
| tuple | PSNR = ('PSNR avg', 'PSNR (dB)') |
| tuple | SSIM = ('SSIM avg', 'SSIM') |
| tuple | ENC_BITRATE = ('Encoding bitrate', 'encoded bitrate (kbps)') |
| tuple | FRAMERATE = ('Frame rate', 'fps') |
| tuple | NUM_DROPPED_FRAMES = ('Number of dropped frames', 'num dropped frames') |
| tuple | NUM_FRAMES_TO_TARGET |
| tuple | ENCODE_TIME = ('Encoding time', 'encode time (us)') |
| tuple | ENCODE_TIME_AVG = ('Encoding time', 'encode time (us) avg') |
| tuple | DECODE_TIME = ('Decoding time', 'decode time (us)') |
| tuple | DECODE_TIME_AVG = ('Decoding time', 'decode time (us) avg') |
| tuple | FRAME_SIZE = ('Frame sizes', 'frame size (bytes)') |
| tuple | FRAME_SIZE_AVG = ('Frame sizes', 'frame size (bytes) avg') |
| tuple | AVG_KEY_FRAME_SIZE = ('Average key frame size', 'avg key frame size (bytes)') |
| tuple | AVG_NON_KEY_FRAME_SIZE |
| list | SETTINGS |
| list | X_SETTINGS |
| list | SUBPLOT_SETTINGS |
| list | RESULTS |
| list | METRICS_TO_PARSE = SETTINGS + SUBPLOT_SETTINGS + RESULTS |
| list | Y_METRICS = [res[1] for res in RESULTS] |
| int | FIG_SIZE_SCALE_FACTOR_X = 2 |
| float | FIG_SIZE_SCALE_FACTOR_Y = 2.8 |
| list | GRID_COLOR = [0.45, 0.45, 0.45] |
| def plot_webrtc_test_logs.GetIdx | ( | text_list | ) |
| def plot_webrtc_test_logs.GetMetric | ( | name, | |
| string | |||
| ) |
| def plot_webrtc_test_logs.GetTitle | ( | filename | ) |
| def plot_webrtc_test_logs.main | ( | void | ) |
| def plot_webrtc_test_logs.ParseMetrics | ( | filename, | |
| setting1, | |||
| setting2 | |||
| ) |
Parses metrics from file.
Args:
filename: The name of the file.
setting1: First setting for sorting metrics (e.g. width).
setting2: Second setting for sorting metrics (e.g. CPU cores used).
Returns:
A dictionary holding parsed metrics.
For example:
metrics[key1][key2][measurement]
metrics = {
"width: 352": {
"CPU cores used: 1.0": {
"encode time (us)": [0.718005, 0.806925, 0.909726, 0.931835, 0.953642],
"PSNR (dB)": [25.546029, 29.465518, 34.723535, 36.428493, 38.686551],
"bitrate (kbps)": [50, 100, 300, 500, 1000]
},
"CPU cores used: 2.0": {
"encode time (us)": [0.718005, 0.806925, 0.909726, 0.931835, 0.953642],
"PSNR (dB)": [25.546029, 29.465518, 34.723535, 36.428493, 38.686551],
"bitrate (kbps)": [50, 100, 300, 500, 1000]
},
},
"width: 176": {
"CPU cores used: 1.0": {
"encode time (us)": [0.857897, 0.91608, 0.959173, 0.971116, 0.980961],
"PSNR (dB)": [30.243646, 33.375592, 37.574387, 39.42184, 41.437897],
"bitrate (kbps)": [50, 100, 300, 500, 1000]
},
}
}
| def plot_webrtc_test_logs.ParseSetting | ( | filename, | |
| setting | |||
| ) |
Parses setting from file. Args: filename: The name of the file. setting: Name of setting to parse (e.g. width). Returns: A list holding parsed settings, e.g. ['width: 128.0', 'width: 160.0']
| def plot_webrtc_test_logs.Plot | ( | y_metric, | |
| x_metric, | |||
| metrics | |||
| ) |
Plots y_metric vs x_metric per key in metrics.
For example:
y_metric = 'PSNR (dB)'
x_metric = 'bitrate (kbps)'
metrics = {
"CPU cores used: 1.0": {
"PSNR (dB)": [25.546029, 29.465518, 34.723535, 36.428493, 38.686551],
"bitrate (kbps)": [50, 100, 300, 500, 1000]
},
"CPU cores used: 2.0": {
"PSNR (dB)": [25.546029, 29.465518, 34.723535, 36.428493, 38.686551],
"bitrate (kbps)": [50, 100, 300, 500, 1000]
},
}
| def plot_webrtc_test_logs.PlotFigure | ( | settings, | |
| y_metrics, | |||
| x_metric, | |||
| metrics, | |||
| title | |||
| ) |
Plots metrics in y_metrics list. One figure is plotted and each entry in the list is plotted in a subplot (and sorted per settings). For example: settings = ['width: 128.0', 'width: 160.0']. Sort subplot per setting. y_metrics = ['PSNR (dB)', 'PSNR (dB)']. Metric to plot per subplot. x_metric = 'bitrate (kbps)'
| def plot_webrtc_test_logs.StringToFloat | ( | value | ) |
| def plot_webrtc_test_logs.ToString | ( | input_list | ) |
| def plot_webrtc_test_logs.ToStringWithoutMetric | ( | input_list, | |
| metric | |||
| ) |
| def plot_webrtc_test_logs.TryFindMetric | ( | parsed, | |
| line, | |||
| f | |||
| ) |
| tuple plot_webrtc_test_logs.AVG_KEY_FRAME_SIZE = ('Average key frame size', 'avg key frame size (bytes)') |
| tuple plot_webrtc_test_logs.AVG_NON_KEY_FRAME_SIZE |
| tuple plot_webrtc_test_logs.BITRATE = ('Target Bitrate', 'bitrate (kbps)') |
| tuple plot_webrtc_test_logs.CODEC_TYPE = ('Codec type', 'Codec') |
| tuple plot_webrtc_test_logs.DECODER_IMPLEMENTATION_NAME = ('Decoder implementation name', 'dec name') |
| tuple plot_webrtc_test_logs.DENOISING = ('Denoising', 'denoising') |
| tuple plot_webrtc_test_logs.ENC_BITRATE = ('Encoding bitrate', 'encoded bitrate (kbps)') |
| tuple plot_webrtc_test_logs.ENCODER_IMPLEMENTATION_NAME = ('Encoder implementation name', 'enc name') |
| tuple plot_webrtc_test_logs.ERROR_CONCEALMENT = ('Error concealment', 'error concealment') |
| string plot_webrtc_test_logs.EVENT_START = 'RUN ] CodecSettings/PlotVideoProcessorIntegrationTest.' |
| int plot_webrtc_test_logs.FIG_SIZE_SCALE_FACTOR_X = 2 |
| float plot_webrtc_test_logs.FIG_SIZE_SCALE_FACTOR_Y = 2.8 |
| tuple plot_webrtc_test_logs.FILENAME = ('Filename', 'clip') |
| tuple plot_webrtc_test_logs.FRAMERATE = ('Frame rate', 'fps') |
| list plot_webrtc_test_logs.GRID_COLOR = [0.45, 0.45, 0.45] |
| tuple plot_webrtc_test_logs.HEIGHT = ('Height', 'height') |
| list plot_webrtc_test_logs.METRICS_TO_PARSE = SETTINGS + SUBPLOT_SETTINGS + RESULTS |
| tuple plot_webrtc_test_logs.NUM_FRAMES_TO_TARGET |
| tuple plot_webrtc_test_logs.PSNR = ('PSNR avg', 'PSNR (dB)') |
| tuple plot_webrtc_test_logs.QP = ('Average QP', 'avg QP') |
| tuple plot_webrtc_test_logs.RESILIENCE = ('Resilience', 'resilience') |
| list plot_webrtc_test_logs.RESULTS |
| list plot_webrtc_test_logs.SETTINGS |
| tuple plot_webrtc_test_logs.SSIM = ('SSIM avg', 'SSIM') |
| list plot_webrtc_test_logs.SUBPLOT_SETTINGS |
| tuple plot_webrtc_test_logs.WIDTH = ('Width', 'width') |
| list plot_webrtc_test_logs.X_SETTINGS |
1.8.13