Skip to content
Snippets Groups Projects
Commit 11b40863 authored by Maël Madon's avatar Maël Madon
Browse files

dev: add in each SABjson the command used to generate it

parent 0c6ecad2
Branches
Tags
No related merge requests found
......@@ -6,6 +6,7 @@ according to the delimitation approach.
from datetime import datetime
import networkx as nx
from src.workload import Session
import sys
class User:
"""Class representing a user of the workload."""
......@@ -157,10 +158,11 @@ class User:
"""User object to dictionnary, for printing or json export."""
if descr is None:
descr = f"user{self.id}"
descr = f"Session Annotated Batsim JSON for user{self.id}"
res = {
"description": descr,
"date": str(datetime.now()),
"command": ' '.join(sys.argv[:]),
"nb_res": self.max_nb_res,
"version": version,
"sessions": [s.to_dict() for _, s in self.sessions.items()]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment