Commit ba5ecdf7 authored by Joanne Hugé's avatar Joanne Hugé

Fix small mistakes

parent 1a06b0f0
......@@ -26,9 +26,12 @@ import csv
import struct
import math
import sys
import json
def compute_offsets_stats(file_path, interval):
interval = int(interval)
measure_set = {}
measure_set["measure_type"] = "packet_jitter_tcpdump"
measure_set["props_names"] = ["packet_jitter_tcpdump"]
......@@ -51,7 +54,7 @@ def compute_offsets_stats(file_path, interval):
if i > 0:
val = arrival_tstamp - prev_tstamp
jitter = (val - interval) / 1000
histogram_index = 1000 + jitter
histogram_index = int(1000 + jitter)
if histogram_index < 0 or histogram_index > 2000:
print("jitter too high: {}\n".format(jitter))
else:
......@@ -70,7 +73,7 @@ def compute_offsets_stats(file_path, interval):
measure_set["props"] = [histogram]
data = {}
data["measure_sets"] = [{measure_set}]
data["measure_sets"] = [{"measure_sets": measure_set}]
path = "tcpdump_histogram"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment