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

Functions

 RunSteps (api)
 
 GenTests (api)
 

Variables

str PYTHON_VERSION_COMPATIBILITY = "PY3"
 
list DEPS
 
str DOCKER_IMAGE = 'gcr.io/skia-public/perf-karma-chrome-tests:87.0.4280.88_v1'
 
str INNER_KARMA_SCRIPT = 'skia/infra/pathkit/perf_pathkit.sh'
 

Function Documentation

◆ GenTests()

perf_pathkit.GenTests (   api)

Definition at line 96 of file perf_pathkit.py.

96def GenTests(api):
97 yield (
98 api.test('Perf-Debian10-EMCC-GCE-CPU-AVX2-wasm-Release-All-PathKit') +
99 api.properties(buildername=('Perf-Debian10-EMCC-GCE-CPU-AVX2'
100 '-wasm-Release-All-PathKit'),
101 repository='https://skia.googlesource.com/skia.git',
102 revision='abc123',
103 path_config='kitchen',
104 swarm_out_dir='[SWARM_OUT_DIR]')
105 )
106
107 yield (
108 api.test('Perf-Debian10-EMCC-GCE-CPU-AVX2-asmjs-Release-All-PathKit') +
109 api.properties(buildername=('Perf-Debian10-EMCC-GCE-CPU-AVX2'
110 '-asmjs-Release-All-PathKit'),
111 repository='https://skia.googlesource.com/skia.git',
112 revision='abc123',
113 path_config='kitchen',
114 swarm_out_dir='[SWARM_OUT_DIR]')
115 )
116
117 yield (
118 api.test('pathkit_trybot') +
119 api.properties(buildername=('Perf-Debian10-EMCC-GCE-CPU-AVX2'
120 '-wasm-Release-All-PathKit'),
121 repository='https://skia.googlesource.com/skia.git',
122 revision='abc123',
123 path_config='kitchen',
124 swarm_out_dir='[SWARM_OUT_DIR]',
125 patch_ref='89/456789/12',
126 patch_repo='https://skia.googlesource.com/skia.git',
127 patch_storage='gerrit',
128 patch_set=7,
129 patch_issue=1234,
130 gerrit_project='skia',
131 gerrit_url='https://skia-review.googlesource.com/')
132 )

◆ RunSteps()

perf_pathkit.RunSteps (   api)

Definition at line 27 of file perf_pathkit.py.

27def RunSteps(api):
28 api.vars.setup()
29 checkout_root = api.path['start_dir']
30 out_dir = api.vars.swarming_out_dir
31
32 # Make sure this exists, otherwise Docker will make it with root permissions.
33 api.file.ensure_directory('mkdirs out_dir', out_dir, mode=0o777)
34
35 # The karma script is configured to look in ./npm-(asmjs|wasm)/bin/ for
36 # the test files to load, so we must copy them there (see Set up for docker).
37 copy_dest = checkout_root.join('skia', 'modules', 'pathkit',
38 'npm-wasm', 'bin')
39 if 'asmjs' in api.vars.builder_name:
40 copy_dest = checkout_root.join('skia', 'modules', 'pathkit',
41 'npm-asmjs', 'bin')
42
43 base_dir = api.vars.build_dir
44 bundle_name = 'pathkit.wasm'
45 if 'asmjs' in api.vars.builder_name:
46 bundle_name = 'pathkit.js.mem'
47
48 copies = [
49 {
50 'src': base_dir.join('pathkit.js'),
51 'dst': copy_dest.join('pathkit.js'),
52 },
53 {
54 'src': base_dir.join(bundle_name),
55 'dst': copy_dest.join(bundle_name),
56 },
57 ]
58 recursive_read = [checkout_root.join('skia')]
59
60 docker_args = None
61 if 'asmjs' in api.vars.builder_name:
62 docker_args = ['--env', 'ASM_JS=1']
63
64 args = [
65 '--builder', api.vars.builder_name,
66 '--git_hash', api.properties['revision'],
67 '--buildbucket_build_id', api.properties.get('buildbucket_build_id', ''),
68 '--bot_id', api.vars.swarming_bot_id,
69 '--task_id', api.vars.swarming_task_id,
70 '--browser', 'Chrome',
71 '--config', api.vars.configuration,
72 '--source_type', 'pathkit',
73 ]
74 if 'asmjs' in api.vars.builder_name:
75 args.extend(['--compiled_language', 'asmjs']) # the default is wasm
76 if api.vars.is_trybot:
77 args.extend([
78 '--issue', api.vars.issue,
79 '--patchset', api.vars.patchset,
80 ])
81
82 api.docker.run(
83 name='Performance tests of PathKit with Docker',
84 docker_image=DOCKER_IMAGE,
85 src_dir=checkout_root,
86 out_dir=out_dir,
87 script=checkout_root.join(INNER_KARMA_SCRIPT),
88 args=args,
89 docker_args=docker_args,
90 copies=copies,
91 recursive_read=recursive_read,
92 attempts=3,
93 )
94
95

Variable Documentation

◆ DEPS

list perf_pathkit.DEPS
Initial value:
1= [
2 'checkout',
3 'docker',
4 'env',
5 'infra',
6 'recipe_engine/file',
7 'recipe_engine/path',
8 'recipe_engine/properties',
9 'recipe_engine/step',
10 'run',
11 'vars',
12]

Definition at line 9 of file perf_pathkit.py.

◆ DOCKER_IMAGE

str perf_pathkit.DOCKER_IMAGE = 'gcr.io/skia-public/perf-karma-chrome-tests:87.0.4280.88_v1'

Definition at line 23 of file perf_pathkit.py.

◆ INNER_KARMA_SCRIPT

str perf_pathkit.INNER_KARMA_SCRIPT = 'skia/infra/pathkit/perf_pathkit.sh'

Definition at line 24 of file perf_pathkit.py.

◆ PYTHON_VERSION_COMPATIBILITY

str perf_pathkit.PYTHON_VERSION_COMPATIBILITY = "PY3"

Definition at line 7 of file perf_pathkit.py.