Include timestamp in nanobench JSON file name

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2366623003
TBR=jcgregorio

Review-Url: https://codereview.chromium.org/2366623003
This commit is contained in:
borenet 2016-09-26 10:25:32 -07:00 committed by Commit bot
parent a8a9dde084
commit 8b5ec39095
14 changed files with 23 additions and 41 deletions

View File

@ -385,7 +385,7 @@
"python", "python",
"-u", "-u",
"\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
"set -x; /data/local/tmp/nanobench --undefok -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --svgs /sdcard/revenge_of_the_skiabot/svgs --images /sdcard/revenge_of_the_skiabot/images/nanobench --nocpu --pre_log --images --gpuStatsDump true --useThermalManager 1,1,10,1000 --scales 1.0 1.1 --config 8888 gpu nonrendering angle hwui f16 srgb msaa4 nvpr4 nvprdit4 esinst --match ~blurroundrect ~patch_grid ~desk_carsvg ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp --outResultsFile /sdcard/revenge_of_the_skiabot/perf/nanobench_abc123.json --properties gitHash abc123 build_number 5 --key arch arm compiler Clang cpu_or_gpu GPU cpu_or_gpu_value Adreno420 extra_config GN_Android model Nexus6 os Android; echo $? >/data/local/tmp/rc", "set -x; /data/local/tmp/nanobench --undefok -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --svgs /sdcard/revenge_of_the_skiabot/svgs --images /sdcard/revenge_of_the_skiabot/images/nanobench --nocpu --pre_log --images --gpuStatsDump true --useThermalManager 1,1,10,1000 --scales 1.0 1.1 --config 8888 gpu nonrendering angle hwui f16 srgb msaa4 nvpr4 nvprdit4 esinst --match ~blurroundrect ~patch_grid ~desk_carsvg ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp --outResultsFile /sdcard/revenge_of_the_skiabot/perf/nanobench_abc123_1337018001.json --properties gitHash abc123 build_number 5 --key arch arm compiler Clang cpu_or_gpu GPU cpu_or_gpu_value Adreno420 extra_config GN_Android model Nexus6 os Android; echo $? >/data/local/tmp/rc",
"[SLAVE_BUILD]/tmp/nanobench.sh" "[SLAVE_BUILD]/tmp/nanobench.sh"
], ],
"name": "write nanobench.sh" "name": "write nanobench.sh"

View File

@ -385,7 +385,7 @@
"python", "python",
"-u", "-u",
"\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
"set -x; /data/local/tmp/nanobench --undefok -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --svgs /sdcard/revenge_of_the_skiabot/svgs --images /sdcard/revenge_of_the_skiabot/images/nanobench --nocpu --pre_log --images --gpuStatsDump true --useThermalManager 1,1,10,1000 --scales 1.0 1.1 --config 8888 gpu nonrendering angle hwui f16 srgb msaa4 nvpr4 nvprdit4 --match ~blurroundrect ~patch_grid ~desk_carsvg ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp --outResultsFile /sdcard/revenge_of_the_skiabot/perf/nanobench_abc123.json --properties gitHash abc123 build_number 5 --key arch arm compiler Clang cpu_or_gpu GPU cpu_or_gpu_value Tegra3 extra_config GN_Android model Nexus7 os Android; echo $? >/data/local/tmp/rc", "set -x; /data/local/tmp/nanobench --undefok -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --svgs /sdcard/revenge_of_the_skiabot/svgs --images /sdcard/revenge_of_the_skiabot/images/nanobench --nocpu --pre_log --images --gpuStatsDump true --useThermalManager 1,1,10,1000 --scales 1.0 1.1 --config 8888 gpu nonrendering angle hwui f16 srgb msaa4 nvpr4 nvprdit4 --match ~blurroundrect ~patch_grid ~desk_carsvg ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp --outResultsFile /sdcard/revenge_of_the_skiabot/perf/nanobench_abc123_1337018001.json --properties gitHash abc123 build_number 5 --key arch arm compiler Clang cpu_or_gpu GPU cpu_or_gpu_value Tegra3 extra_config GN_Android model Nexus7 os Android; echo $? >/data/local/tmp/rc",
"[SLAVE_BUILD]/tmp/nanobench.sh" "[SLAVE_BUILD]/tmp/nanobench.sh"
], ],
"name": "write nanobench.sh" "name": "write nanobench.sh"

View File

@ -385,7 +385,7 @@
"python", "python",
"-u", "-u",
"\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n",
"set -x; /data/local/tmp/nanobench --undefok -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --svgs /sdcard/revenge_of_the_skiabot/svgs --images /sdcard/revenge_of_the_skiabot/images/nanobench --nocpu --pre_log --images --gpuStatsDump true --useThermalManager 1,1,10,1000 --scales 1.0 1.1 --config 8888 gpu nonrendering angle hwui f16 srgb --match ~blurroundrect ~patch_grid ~desk_carsvg ~desk_unicodetable ~interlaced1.png ~interlaced2.png ~interlaced3.png ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp --outResultsFile /sdcard/revenge_of_the_skiabot/perf/nanobench_abc123.json --properties gitHash abc123 build_number 5 --key arch x86 compiler Clang cpu_or_gpu GPU cpu_or_gpu_value PowerVR extra_config GN_Android model NexusPlayer os Android; echo $? >/data/local/tmp/rc", "set -x; /data/local/tmp/nanobench --undefok -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --svgs /sdcard/revenge_of_the_skiabot/svgs --images /sdcard/revenge_of_the_skiabot/images/nanobench --nocpu --pre_log --images --gpuStatsDump true --useThermalManager 1,1,10,1000 --scales 1.0 1.1 --config 8888 gpu nonrendering angle hwui f16 srgb --match ~blurroundrect ~patch_grid ~desk_carsvg ~desk_unicodetable ~interlaced1.png ~interlaced2.png ~interlaced3.png ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp --outResultsFile /sdcard/revenge_of_the_skiabot/perf/nanobench_abc123_1337018001.json --properties gitHash abc123 build_number 5 --key arch x86 compiler Clang cpu_or_gpu GPU cpu_or_gpu_value PowerVR extra_config GN_Android model NexusPlayer os Android; echo $? >/data/local/tmp/rc",
"[SLAVE_BUILD]/tmp/nanobench.sh" "[SLAVE_BUILD]/tmp/nanobench.sh"
], ],
"name": "write nanobench.sh" "name": "write nanobench.sh"

View File

@ -157,7 +157,7 @@
"~inc0.webp", "~inc0.webp",
"~inc1.webp", "~inc1.webp",
"--outResultsFile", "--outResultsFile",
"[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-GN/data/nanobench_abc123.json", "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-GN/data/nanobench_abc123_1337018001.json",
"--properties", "--properties",
"gitHash", "gitHash",
"abc123", "abc123",

View File

@ -157,7 +157,7 @@
"~inc0.webp", "~inc0.webp",
"~inc1.webp", "~inc1.webp",
"--outResultsFile", "--outResultsFile",
"[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-GN/data/nanobench_abc123.json", "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-GN/data/nanobench_abc123_1337018001.json",
"--properties", "--properties",
"gitHash", "gitHash",
"abc123", "abc123",

View File

@ -171,7 +171,7 @@
"~inc0.webp", "~inc0.webp",
"~inc1.webp", "~inc1.webp",
"--outResultsFile", "--outResultsFile",
"[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind/data/nanobench_abc123.json", "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind/data/nanobench_abc123_1337018001.json",
"--properties", "--properties",
"gitHash", "gitHash",
"abc123", "abc123",
@ -268,7 +268,7 @@
"~inc0.webp", "~inc0.webp",
"~inc1.webp", "~inc1.webp",
"--outResultsFile", "--outResultsFile",
"[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind/data/nanobench_abc123.json", "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind/data/nanobench_abc123_1337018001.json",
"--properties", "--properties",
"gitHash", "gitHash",
"abc123", "abc123",

View File

@ -159,7 +159,7 @@
"~inc0.webp", "~inc0.webp",
"~inc1.webp", "~inc1.webp",
"--outResultsFile", "--outResultsFile",
"[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-VisualBench/data/nanobench_abc123.json", "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-VisualBench/data/nanobench_abc123_1337018001.json",
"--properties", "--properties",
"gitHash", "gitHash",
"abc123", "abc123",

View File

@ -156,7 +156,7 @@
"~inc0.webp", "~inc0.webp",
"~inc1.webp", "~inc1.webp",
"--outResultsFile", "--outResultsFile",
"[CUSTOM_[SWARM_OUT_DIR]]\\perfdata\\Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Release\\data\\nanobench_abc123.json", "[CUSTOM_[SWARM_OUT_DIR]]\\perfdata\\Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Release\\data\\nanobench_abc123_1337018001.json",
"--properties", "--properties",
"gitHash", "gitHash",
"abc123", "abc123",

View File

@ -158,7 +158,7 @@
"~inc0.webp", "~inc0.webp",
"~inc1.webp", "~inc1.webp",
"--outResultsFile", "--outResultsFile",
"[CUSTOM_[SWARM_OUT_DIR]]\\perfdata\\Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot\\data\\nanobench_abc123.json", "[CUSTOM_[SWARM_OUT_DIR]]\\perfdata\\Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot\\data\\nanobench_abc123_1337018001.json",
"--properties", "--properties",
"gitHash", "gitHash",
"abc123", "abc123",

View File

@ -158,7 +158,7 @@
"~inc0.webp", "~inc0.webp",
"~inc1.webp", "~inc1.webp",
"--outResultsFile", "--outResultsFile",
"[CUSTOM_[SWARM_OUT_DIR]]\\perfdata\\Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot\\data\\nanobench_abc123.json", "[CUSTOM_[SWARM_OUT_DIR]]\\perfdata\\Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot\\data\\nanobench_abc123_1337018001.json",
"--properties", "--properties",
"gitHash", "gitHash",
"abc123", "abc123",

View File

@ -193,7 +193,7 @@
"~inc0.webp", "~inc0.webp",
"~inc1.webp", "~inc1.webp",
"--outResultsFile", "--outResultsFile",
"[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind-Trybot/data/nanobench_abc123.json", "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind-Trybot/data/nanobench_abc123_1337018001.json",
"--properties", "--properties",
"gitHash", "gitHash",
"abc123", "abc123",
@ -296,7 +296,7 @@
"~inc0.webp", "~inc0.webp",
"~inc1.webp", "~inc1.webp",
"--outResultsFile", "--outResultsFile",
"[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind-Trybot/data/nanobench_abc123.json", "[CUSTOM_[SWARM_OUT_DIR]]/perfdata/Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind-Trybot/data/nanobench_abc123_1337018001.json",
"--properties", "--properties",
"gitHash", "gitHash",
"abc123", "abc123",

View File

@ -14,6 +14,7 @@ DEPS = [
'recipe_engine/platform', 'recipe_engine/platform',
'recipe_engine/properties', 'recipe_engine/properties',
'recipe_engine/raw_io', 'recipe_engine/raw_io',
'recipe_engine/time',
'run', 'run',
'flavor', 'flavor',
'vars', 'vars',
@ -43,6 +44,9 @@ TEST_BUILDERS = {
} }
import time
def nanobench_flags(bot): def nanobench_flags(bot):
args = ['--pre_log'] args = ['--pre_log']
@ -201,9 +205,11 @@ def perf_steps(api):
args.extend(nanobench_flags(api.vars.builder_name)) args.extend(nanobench_flags(api.vars.builder_name))
if api.vars.upload_perf_results: if api.vars.upload_perf_results:
now = api.time.utcnow()
ts = int(time.mktime(now.utctimetuple()))
json_path = api.flavor.device_path_join( json_path = api.flavor.device_path_join(
api.flavor.device_dirs.perf_data_dir, api.flavor.device_dirs.perf_data_dir,
'nanobench_%s.json' % api.vars.got_revision) 'nanobench_%s_%d.json' % (api.vars.got_revision, ts))
args.extend(['--outResultsFile', json_path]) args.extend(['--outResultsFile', json_path])
args.extend(properties) args.extend(properties)

View File

@ -680,28 +680,6 @@
"@@@STEP_LINK@view steps on Milo@https://luci-milo.appspot.com/swarming/task/10000@@@" "@@@STEP_LINK@view steps on Milo@https://luci-milo.appspot.com/swarming/task/10000@@@"
] ]
}, },
{
"cmd": [
"python",
"-u",
"\nimport os, sys\nfrom common import chromium_utils # Error? See https://crbug.com/584783.\n\n\nif os.path.exists(sys.argv[1]):\n chromium_utils.RemoveDirectory(sys.argv[1])\n",
"[SLAVE_BUILD]/swarming_temp_dir/outputs/perf_skia"
],
"env": {
"PYTHONPATH": "[SLAVE_BUILD]/skia/infra/bots/.recipe_deps/build/scripts"
},
"name": "rmtree perf_skia",
"~followup_annotations": [
"@@@STEP_LOG_LINE@python.inline@@@@",
"@@@STEP_LOG_LINE@python.inline@import os, sys@@@",
"@@@STEP_LOG_LINE@python.inline@from common import chromium_utils # Error? See https://crbug.com/584783.@@@",
"@@@STEP_LOG_LINE@python.inline@@@@",
"@@@STEP_LOG_LINE@python.inline@@@@",
"@@@STEP_LOG_LINE@python.inline@if os.path.exists(sys.argv[1]):@@@",
"@@@STEP_LOG_LINE@python.inline@ chromium_utils.RemoveDirectory(sys.argv[1])@@@",
"@@@STEP_LOG_END@python.inline@@@"
]
},
{ {
"cmd": [ "cmd": [
"python", "python",
@ -715,9 +693,7 @@
"--json", "--json",
"{\"base_task_name\": \"perf_skia/Ubuntu/def456/Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Trybot/5\", \"tasks\": {\"perf_skia/Ubuntu/def456/Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Trybot/5\": {\"shard_index\": 0, \"task_id\": \"10000\", \"view_url\": \"https://chromium-swarm.appspot.com/user/task/10000\"}}}", "{\"base_task_name\": \"perf_skia/Ubuntu/def456/Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Trybot/5\", \"tasks\": {\"perf_skia/Ubuntu/def456/Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Trybot/5\": {\"shard_index\": 0, \"task_id\": \"10000\", \"view_url\": \"https://chromium-swarm.appspot.com/user/task/10000\"}}}",
"--task-summary-json", "--task-summary-json",
"/path/to/tmp/json", "/path/to/tmp/json"
"--task-output-dir",
"[SLAVE_BUILD]/swarming_temp_dir/outputs/perf_skia"
], ],
"name": "perf_skia on Ubuntu", "name": "perf_skia on Ubuntu",
"~followup_annotations": [ "~followup_annotations": [

View File

@ -473,13 +473,13 @@ def perf_steps_trigger(api, builder_cfg, got_revision, infrabots_dir,
expiration=expiration, expiration=expiration,
hard_timeout=hard_timeout, hard_timeout=hard_timeout,
io_timeout=io_timeout, io_timeout=io_timeout,
cipd_packages=cipd_packages) cipd_packages=cipd_packages,
store_output=False)
def perf_steps_collect(api, task, builder_cfg, got_revision, infrabots_dir): def perf_steps_collect(api, task, builder_cfg, got_revision, infrabots_dir):
"""Wait for perf steps to finish and upload results.""" """Wait for perf steps to finish and upload results."""
# Wait for nanobench to finish, download the results. # Wait for nanobench to finish, download the results.
api.run.rmtree(task.task_output_dir)
if not api.vars.upload_perf_results: # pragma: nocover if not api.vars.upload_perf_results: # pragma: nocover
api.swarming.collect_swarming_task(task) api.swarming.collect_swarming_task(task)
return return