--- /dev/null
+#!/usr/bin/python
+
+import sys
+
+lines = list(open('delays.data'))
+classes = set()
+classes.add("")
+for line in lines:
+ line = line.strip().split('\t')
+ try:
+ classes.add(line[3])
+ except:
+ pass
+
+cmd = "plot"
+replace = {}
+n = 0
+print classes
+for c in sorted(classes):
+ if n > 0:
+ cmd += ","
+ cmd += ' "delays-1.data" using ($4 == %d ? $2 : 1.0/0.0):1 title "%s"' % (n, c or 'NORMAL')
+ replace[c] = n
+ n += 1
+
+print cmd
+
+fp = open('delays-1.data', 'w')
+for line in lines:
+ line = line.strip().split('\t')
+ while len(line) < 4: line.append("")
+ line[3] = str(replace[line[3]])
+ fp.write('\t'.join(line) + '\n')
--- /dev/null
+#!/usr/bin/python
+#
+# Analyze the inter-packet times of requests to/from cloud storage providers.
+
+import json, sys
+
+RTT_EST = 0.03
+
+def analyze_transfer(timings):
+ for (delay, bytes) in timings:
+ gap = False
+ if delay > 2 * RTT_EST:
+ gap = True
+ print "Long gap of", delay
+ elif delay > RTT_EST / 2:
+ gap = True
+ print "Short gap of", delay
+ if gap:
+ print " [occurred after", bytes, "bytes]"
+
+for f in sys.argv[1:]:
+ stats = json.load(open(f))
+ for s in stats:
+ if 'interpacket_times' in s:
+ analyze_transfer(s['interpacket_times'])