Skip to content
This repository was archived by the owner on Dec 26, 2022. It is now read-only.

Commit 8d0a859

Browse files
committed
feat(reg): Add DEBUG_FLAG for debuggin mode
1 parent d5054bb commit 8d0a859

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tests/regression/runner.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,14 @@
77
import statistics
88
import time
99

10+
DEBUG_FLAG = False
1011
if len(sys.argv) == 2:
1112
raw_url = sys.argv[1]
13+
elif len(sys.argv) == 3:
14+
raw_url = sys.argv[1]
15+
# if DEBUG_FLAG field == `Y`, then starts debugging mode
16+
if sys.argv[2] == 'y' or sys.argv[2] == 'Y':
17+
DEBUG_FLAG = True
1218
else:
1319
raw_url = "localhost:8000"
1420
url = "http://" + raw_url
@@ -19,7 +25,10 @@
1925
MSG_STATUS_CODE_405 = "[405] Method Not Allowed"
2026
CURL_EMPTY_REPLY = "000"
2127

22-
TIMES_TOTAL = 100
28+
if DEBUG_FLAG == True:
29+
TIMES_TOTAL = 2
30+
else:
31+
TIMES_TOTAL = 100
2332

2433

2534
def eval_stat(time_cost, func_name):

0 commit comments

Comments
 (0)