Commit 972d234f authored by Ned Nguyen's avatar Ned Nguyen Committed by Commit Bot

Add logging for timing of run_performance_tests.py

This is to debug why the actual shard runtime is so different from predicted
shard's runtime

Change-Id: I025de62a10729d17790bb22650dfa61423daf7ce

TBR=eyaich@chromium.org

Change-Id: I025de62a10729d17790bb22650dfa61423daf7ce
Reviewed-on: https://chromium-review.googlesource.com/1110554Reviewed-by: default avatarNed Nguyen <nednguyen@google.com>
Commit-Queue: Ned Nguyen <nednguyen@google.com>
Cr-Commit-Position: refs/heads/master@{#569506}
parent 1321b38d
...@@ -49,6 +49,7 @@ import json ...@@ -49,6 +49,7 @@ import json
import os import os
import shutil import shutil
import sys import sys
import time
import tempfile import tempfile
import traceback import traceback
...@@ -82,8 +83,13 @@ def write_results( ...@@ -82,8 +83,13 @@ def write_results(
f.write(benchmark_log) f.write(benchmark_log)
def print_duration(step, start):
print 'Duration of %s: %d seconds' % (step, time.time() - start)
def execute_benchmark(benchmark, isolated_out_dir, def execute_benchmark(benchmark, isolated_out_dir,
args, rest_args, is_reference, stories=None): args, rest_args, is_reference, stories=None):
start = time.time()
# While we are between chartjson and histogram set we need # While we are between chartjson and histogram set we need
# to determine which output format to look for or see if it was # to determine which output format to look for or see if it was
# already passed in in which case that format applies to all benchmarks # already passed in in which case that format applies to all benchmarks
...@@ -128,6 +134,8 @@ def execute_benchmark(benchmark, isolated_out_dir, ...@@ -128,6 +134,8 @@ def execute_benchmark(benchmark, isolated_out_dir,
write_results( write_results(
benchmark_name, perf_results, json_test_results, benchmark_log, benchmark_name, perf_results, json_test_results, benchmark_log,
isolated_out_dir, False) isolated_out_dir, False)
print_duration('executing benchmark %s' % benchmark_name, start)
return rc return rc
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment