Flutter Engine
The Flutter Engine
Functions | Variables
upload_buildstats_results Namespace Reference

Functions

def RunSteps (api)
 
def GenTests (api)
 

Variables

string PYTHON_VERSION_COMPATIBILITY = "PY3"
 
list DEPS
 

Function Documentation

◆ GenTests()

def upload_buildstats_results.GenTests (   api)

Definition at line 57 of file upload_buildstats_results.py.

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

◆ RunSteps()

def upload_buildstats_results.RunSteps (   api)

Definition at line 21 of file upload_buildstats_results.py.

21def RunSteps(api):
22 # Upload the buildstats 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=['buildstats_abc123.json', 'buildstats_def.json'])
33 if not len(results): # pragma: nocover
34 raise Exception('Unable to find buildstats JSON file!')
35
36 for src in results:
37 basename = api.path.basename(src)
38 basename = api.properties['revision'] + '_' + basename
39 gs_path = '/'.join((
40 'buildstats-json-v1', str(now.year).zfill(4),
41 str(now.month).zfill(2), str(now.day).zfill(2), str(now.hour).zfill(2),
42 api.vars.builder_name))
43
44 if api.vars.is_trybot:
45 gs_path = '/'.join(('trybot', gs_path,
46 str(api.vars.issue), str(api.vars.patchset)))
47
48 dst = '/'.join((
49 'gs://%s' % api.properties['gs_bucket'], gs_path, basename))
50
51 api.step(
52 'upload %s' % src,
53 cmd=['gsutil', 'cp', '-z', 'json', src, dst],
54 infra_step=True)
55
56
static SkString join(const CommandLineFlags::StringArray &)
Definition: skpbench.cpp:741

Variable Documentation

◆ DEPS

list upload_buildstats_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_buildstats_results.py.

◆ PYTHON_VERSION_COMPATIBILITY

string upload_buildstats_results.PYTHON_VERSION_COMPATIBILITY = "PY3"

Definition at line 8 of file upload_buildstats_results.py.