-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMintEDGE.py
More file actions
36 lines (27 loc) · 876 Bytes
/
Copy pathMintEDGE.py
File metadata and controls
36 lines (27 loc) · 876 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import argparse
import sys
import time
import mintedge
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument(
"--simulation-time", required=True, help="time to be simulated"
)
parser.add_argument(
"--seed", required=True, help="seed for the random generator"
)
parser.add_argument("--output", required=True, help="output file path")
args = sys.argv[1:]
args = parser.parse_args(args)
sim_time = int(args.simulation_time)
output = args.output
seed = int(args.seed)
# Record the start time
start_time = time.time()
sim = mintedge.Simulation(sim_time, output, seed)
sim.run()
# Record the end time
end_time = time.time()
# Calculate the execution time
execution_time = end_time - start_time
print(f"Execution Time: {execution_time:.2f} seconds")