|
@@ -42,5 +42,8 @@ if __name__ == "__main__":
|
|
args = parser.parse_args()
|
|
args = parser.parse_args()
|
|
thread = int(args.thread)
|
|
thread = int(args.thread)
|
|
dt = ["{}#http://127.0.0.1:5000/lightgbm_score".format(i) for i in range(1, 1001)]
|
|
dt = ["{}#http://127.0.0.1:5000/lightgbm_score".format(i) for i in range(1, 1001)]
|
|
|
|
+ total_s = time.time()
|
|
with ThreadPoolExecutor(max_workers=thread) as pool:
|
|
with ThreadPoolExecutor(max_workers=thread) as pool:
|
|
pool.map(request_data, dt)
|
|
pool.map(request_data, dt)
|
|
|
|
+ total_e = time.time()
|
|
|
|
+ print(total_e - total_s)
|