新增检测时间

This commit is contained in:
root 2021-11-22 15:44:20 +08:00
parent 8e0fdd0f90
commit 7b6e7bdc24
2 changed files with 7 additions and 0 deletions

7
app.py
View File

@ -3,6 +3,7 @@ import detect_gitee, detect_trustie
import re
import operator
import redis
import time
app = Flask(__name__)
@ -84,6 +85,8 @@ def parse_trustie(PR_url, error):
@app.route('/result',methods = ['POST', 'GET'])
def output():
start_time = time.time()
if request.method == "GET":
result = request
@ -97,6 +100,8 @@ def output():
print("trustie")
re = parse_trustie(PR_url, error)
print("time cost: ", time.time() - start_time)
if re["error"] == 1:
return render_template("error.html", result=locals())
else:
@ -116,6 +121,8 @@ def output():
print("trustie")
re = parse_trustie(PR_url, error)
print("time cost: ", time.time() - start_time)
if re["error"] == 1:
return render_template("error.html", result=locals())
else:

BIN
nohup.out

Binary file not shown.