Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions | Variables
upload_nano_results Namespace Reference

Functions

 RunSteps (api)
 
 GenTests (api)
 

Variables

str PYTHON_VERSION_COMPATIBILITY = "PY3"
 
list DEPS
 

Function Documentation

◆ GenTests()

upload_nano_results.GenTests (   api)

Definition at line 56 of file upload_nano_results.py.

56def GenTests(api):
57 builder = 'Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-All-Debug'
58 yield (
59 api.test('normal_bot') +
60 api.properties(buildername=builder,
61 gs_bucket='skia-perf',
62 revision='abc123',
63 path_config='kitchen')
64 )
65
66 yield (
67 api.test('trybot') +
68 api.properties(buildername=builder,
69 gs_bucket='skia-perf',
70 revision='abc123',
71 path_config='kitchen') +
72 api.properties.tryserver(
73 buildername=builder,
74 gerrit_project='skia',
75 gerrit_url='https://skia-review.googlesource.com/',
76 )
77 )

◆ RunSteps()

upload_nano_results.RunSteps (   api)

Definition at line 21 of file upload_nano_results.py.

21def RunSteps(api):
22 # Upload the nanobench results.
23 api.vars.setup()
24
25 now = api.time.utcnow()
26 src_path = api.path['start_dir'].join('perf')
27 with api.context(cwd=src_path):
28 results = api.file.glob_paths(
29 'find results',
30 src_path,
31 '*.json',
32 test_data=['nanobench_abc123.json'])
33 if len(results) != 1: # pragma: nocover
34 raise Exception('Unable to find nanobench or skpbench JSON file!')
35
36 src = results[0]
37 basename = api.path.basename(src)
38 gs_path = '/'.join((
39 'nano-json-v1', str(now.year).zfill(4),
40 str(now.month).zfill(2), str(now.day).zfill(2), str(now.hour).zfill(2),
41 api.vars.builder_name))
42
43 if api.vars.is_trybot:
44 gs_path = '/'.join(('trybot', gs_path,
45 str(api.vars.issue), str(api.vars.patchset)))
46
47 dst = '/'.join((
48 'gs://%s' % api.properties['gs_bucket'], gs_path, basename))
49
50 api.step(
51 'upload',
52 cmd=['gsutil', 'cp', '-z', 'json', src, dst],
53 infra_step=True)
54
55

Variable Documentation

◆ DEPS

list upload_nano_results.DEPS
Initial value:
1= [
2 'recipe_engine/context',
3 'recipe_engine/file',
4 'recipe_engine/path',
5 'recipe_engine/properties',
6 'recipe_engine/step',
7 'recipe_engine/time',
8 'vars',
9]

Definition at line 10 of file upload_nano_results.py.

◆ PYTHON_VERSION_COMPATIBILITY

str upload_nano_results.PYTHON_VERSION_COMPATIBILITY = "PY3"

Definition at line 8 of file upload_nano_results.py.