diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index 0cf220dcf..cb31f2464 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -105,7 +105,9 @@ class MyshixunsController < ApplicationController resubmit = jsonTestDetails['resubmit'] outPut = tran_base64_decode64(jsonTestDetails['outPut']) # 资源消耗 + uid_logger("##########!!!!!!#{jsonTestDetails['resUsage']}") max_mem = tran_base64_decode64(jsonTestDetails['resUsage']) if jsonTestDetails['resUsage'].present? + uid_logger("##########!!!!!!#{max_mem}") jenkins_testsets = jsonTestDetails['msg'] compile_success = jsonTestDetails['compileSuccess'] # message = Base64.decode64(params[:msg]) unless params[:msg].blank? @@ -201,6 +203,7 @@ class MyshixunsController < ApplicationController test_cases_time = format("%.3f", (Time.now.to_f - t1.to_f)).to_f if record.present? consume_time = format("%.3f", (Time.now - record.created_at)).to_f + uid_logger("11122233334444#{max_mem}, #{sec_key}") record.update_attributes!(:consume_time => consume_time, :git_pull => timeCost['pull'] , :create_pod => timeCost['createPod'], :pod_execute => timeCost['execute'], :test_cases => test_cases_time, :max_mem => max_mem, :brige => timeCost['evaluateAllTime'], :return_back => return_back_time) diff --git a/app/views/games/_testset_list.json.jbuilder b/app/views/games/_testset_list.json.jbuilder index 579adc3e6..e5cc76625 100644 --- a/app/views/games/_testset_list.json.jbuilder +++ b/app/views/games/_testset_list.json.jbuilder @@ -7,7 +7,7 @@ json.test_sets @qurey_test_sets do |test_set| json.actual_output evaluate_actual_output(test_set) end json.compile_success test_set.try(:compile_success) - json.ts_time test_set.ts_time + json.ts_time test_set.try(:ts_time) end json.allowed_unlock @shixun.test_set_permission