# \ nid3.log
#
-from __future__ import print_function
+
import collections
import functools
if not found_files:
msg = "No CCND output files were found to parse at %s " % logs_dir
- raise RuntimeError, msg
+ raise RuntimeError(msg)
if parse_ping_logs:
ping_parser.annotate_cn_graph(logs_dir, graph)
fname = graph.node[nid]["history"]
history = load_content_history(fname)
- for content_name in history.keys():
+ for content_name in list(history.keys()):
hist = history[content_name]
for (timestamp, message_type, nid1, nid2, nonce, size, line) in hist:
# Compute the time elapsed between the time an interest is sent
# in the consumer node and when the content is received back
- for content_name in content_names.keys():
+ for content_name in list(content_names.keys()):
# order content and interest messages by timestamp
content_names[content_name]["content"] = sorted(
content_names[content_name]["content"])
for nonce, timestamps in content_names[content_name][
- "interest"].iteritems():
+ "interest"].items():
content_names[content_name]["interest"][nonce] = sorted(
timestamps)