#!/usr/bin/python2 # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All contributing project authors may # be found in the AUTHORS file in the root of the source tree. # To run this script please copy "out///pyproto/webrtc/modules/ # audio_coding/audio_network_adaptor/debug_dump_pb2.py" to this folder. # The you can run this script with: # "python parse_ana_dump.py -m uplink_bandwidth_bps -f dump_file.dat" # You can add as may metrics or decisions to the plot as you like. # form more information call: # "python parse_ana_dump.py --help" import struct from optparse import OptionParser import matplotlib.pyplot as plt import debug_dump_pb2 def GetNextMessageSize(file_to_parse): data = file_to_parse.read(4) if data == '': return 0 return struct.unpack('