-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDebug.py
More file actions
59 lines (45 loc) · 1.48 KB
/
Debug.py
File metadata and controls
59 lines (45 loc) · 1.48 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import Session as wSess
import Constants as wConst
import sys
import json
def simulate(GAP, Process, rawTests, finishedTests, variable):
s = wSess.Session(54321)
s.selections["GAP_Selection"] = GAP
s.selections["Process_Selection"] = Process
s.selections["rawTests"] = rawTests
s.selections["finishedTests"] = finishedTests
s.balance = float("inf")
cycles = 10000
matrix = []
if(variable == "GAP"):
for key in wConst.GAP:
s.selections["GAP_Selection"] = key
data = s.cycle(cycles)
#result = json.loads(data)
data["key"] = key
matrix.append(data)
if(variable == "Process"):
for key in wConst.PROCESS:
s.selections["Process_Selection"] = key
data = s.cycle(cycles)
#result = json.loads(data)
data["key"] = key
matrix.append(data)
if(variable == "rawTests"):
for i in range(0, 51):
print(i)
s.selections["rawTests"] = i
data = s.cycle(cycles)
#result = json.loads(data)
data["key"] = i
matrix.append(data)
if(variable == "finishedTests"):
for i in range(0, 51):
print(i)
s.selections["finishedTests"] = i
data = s.cycle(cycles)
#result = json.loads(data)
data["key"] = i
matrix.append(data)
print(json.dumps(matrix, indent=2))
return matrix