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

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

Issue 2310063002: Improvements to UI to python event log analyzer tool. (Closed)
Patch Set: Removed space. 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 | webrtc/tools/py_event_log_analyzer/pb_parse.py » ('j') | 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 """Utility functions for calculating statistics. 9 """Utility functions for calculating statistics.
10 """ 10 """
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 E.g. unwrap([0, 1, 2, 0, 1, 2, 7, 8], 3) -> [0, 1, 2, 3, 66 E.g. unwrap([0, 1, 2, 0, 1, 2, 7, 8], 3) -> [0, 1, 2, 3,
67 4, 5, 4, 5] 67 4, 5, 4, 5]
68 """ 68 """
69 lst = data[:] 69 lst = data[:]
70 for i in range(1, len(data)): 70 for i in range(1, len(data)):
71 lst[i] = lst[i - 1] + (lst[i] - lst[i - 1] + 71 lst[i] = lst[i - 1] + (lst[i] - lst[i - 1] +
72 mod // 2) % mod - (mod // 2) 72 mod // 2) % mod - (mod // 2)
73 return lst 73 return lst
74 74
75
76 def ssrc_directions(data_points):
77 ssrc_is_incoming = {}
78 for point in data_points:
79 ssrc_is_incoming[point.ssrc] = point.incoming
80 return ssrc_is_incoming
81
82
75 # Python 2/3-compatible input function 83 # Python 2/3-compatible input function
76 if sys.version_info[0] <= 2: 84 if sys.version_info[0] <= 2:
77 get_input = raw_input 85 get_input = raw_input
78 else: 86 else:
79 get_input = input 87 get_input = input
OLDNEW
« no previous file with comments | « no previous file | webrtc/tools/py_event_log_analyzer/pb_parse.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698