Python event log analyzer tool: fix of indexing issue.

Test added to ensure it doesn't happen again.

NOTRY=True

Review-Url: https://codereview.webrtc.org/2316573003
Cr-Commit-Position: refs/heads/master@{#14121}
This commit is contained in:
aleloi
2016-09-08 01:30:26 -07:00
committed by Commit bot
parent a4c2106120
commit ac398f2a4c
3 changed files with 63 additions and 2 deletions

View File

@ -280,7 +280,7 @@ def calculate_delay(start, stop, step, points):
masked array, in which time points with no value are masked.
"""
grouped_delays = [[] for _ in numpy.arange(start, stop, step)]
grouped_delays = [[] for _ in numpy.arange(start, stop + step, step)]
rounded_value_index = lambda x: int((x - start) / step)
for point in points:
grouped_delays[rounded_value_index(point.real_send_time_ms)