diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-09-09 18:47:02 +0200 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-09-09 18:47:02 +0200 |
| commit | 0e1e51d1ee7392d22336e9bf0067a895741e8866 (patch) | |
| tree | 02ea76f9ff9783a0ebdad8acaa4c8fd1af7376da /esds/debug.py | |
| parent | bc4ce548db258f79f0841def89f1a70316cef43d (diff) | |
Improve debug
Diffstat (limited to 'esds/debug.py')
| -rw-r--r-- | esds/debug.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/esds/debug.py b/esds/debug.py index fe19745..66a781a 100644 --- a/esds/debug.py +++ b/esds/debug.py @@ -13,11 +13,13 @@ class Debug: self.loop_count=0 self.logs=list() header={ + "debug_version": 1, "python_version" : sys.version, "simulation_started_at": simulator.startat, "number_of_nodes": len(simulator.nodes), "manual_breakpoints": breakpoints, - "auto_breakpoint": breakpoints_every + "auto_breakpoint": breakpoints_every, + "interferences": interferences } self.write(header,append=False) @@ -27,7 +29,7 @@ class Debug: def write(self,data, append=True): mode="a" if append else "w" with open(self.file_path, mode) as f: - f.write(json.dumps(data,default=serialize_int64)) + f.write(json.dumps(data,default=serialize_int64,separators=(",",":"))) f.write("\n") def get_network_interfaces(self): |
