Skip to content

Commit

Permalink
Fix timestamp output
Browse files Browse the repository at this point in the history
  • Loading branch information
algorandskiy committed Aug 5, 2024
1 parent 4bb53b4 commit 2892bc6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion test/heapwatch/topology-extract-ws-e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ def main():
remote_name = resolved
source = remote_name
target = node_name
edges.append((source, target))
if args.timestamp:
# datetime is not serializable, so we store it as string for now
edge = (source, target, {'dt': data["time"]})
else:
edge = (source, target)

# Check for outgoing connections
elif "Made outgoing connection to peer" in data.get('msg', ""):
Expand Down
6 changes: 5 additions & 1 deletion test/heapwatch/topology-extract-ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ def main():
remote_name = ip_to_name[remote_ip]
source = remote_name
target = mapped
edges.append((source, target))
if args.timestamp:
# datetime is not serializable, so we store it as string for now
edge = (source, target, {'dt': data["time"]})
else:
edge = (source, target)

# Check for outgoing connections
elif "Made outgoing connection to peer" in data.get('msg', ""):
Expand Down

0 comments on commit 2892bc6

Please sign in to comment.