OLD | NEW |
---|---|
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 # Test startup time for loading a basic PPAPI nexe in the browser. | 6 # Test startup time for loading a basic PPAPI nexe in the browser. |
7 | 7 |
8 Import('env') | 8 Import('env') |
9 | 9 |
10 # Pull in the ppapi_test_example as a "barebones" PPAPI startup example. | |
11 # Hope it does not change to do more than just the barebones. | |
12 # We must make a separate build though, to get a different nexe "key" | |
13 # for the env.Publish() / env.ExtractPublishedFiles() magic. | |
14 nexe_name = 'browser_startup_time_${TARGET_FULLARCH}' | 10 nexe_name = 'browser_startup_time_${TARGET_FULLARCH}' |
15 stripped_nexe = ('browser_startup_time_stripped_%s.nexe' % | 11 stripped_nexe = ('browser_startup_time_stripped_%s.nexe' % |
16 env.get('TARGET_FULLARCH')) | 12 env.get('TARGET_FULLARCH')) |
17 | 13 |
18 browser_startup_nexe = env.ComponentProgram( | 14 browser_startup_nexe = env.ComponentProgram( |
19 nexe_name, | 15 nexe_name, |
20 ['hello_world.cc'], | 16 ['hello_world.cc'], |
21 EXTRA_LIBS=['${PPAPI_LIBS}', 'ppapi_cpp']) | 17 EXTRA_LIBS=['${PPAPI_LIBS}', 'ppapi_cpp']) |
22 | 18 |
23 env.Publish(nexe_name, 'run', | 19 env.Publish(nexe_name, 'run', |
24 ['browser_startup_time.html', | 20 ['browser_startup_time.html', |
25 'browser_startup_time.js']) | 21 'browser_startup_time.js']) |
26 | 22 |
27 test_name = 'browser_startup_time.out' | 23 test_name = 'browser_startup_time.out' |
28 output_processor = ['${PYTHON}', | 24 output_processor_1 = ['${PYTHON}', |
29 str(env.File( | 25 str(env.File( |
30 '${SCONSTRUCT_DIR}/tools/process_perf_output.py')), | 26 '${SCONSTRUCT_DIR}/tools/process_perf_output.py')), |
31 test_name, | 27 test_name, |
32 env.GetPerfEnvDescription()] | 28 env.GetPerfEnvDescription()] |
29 output_processor_c = ['${PYTHON}', | |
30 str(env.File( | |
31 '${SCONSTRUCT_DIR}/tools/process_perf_combined.py'))] | |
32 | |
33 | 33 |
34 node = env.PPAPIBrowserTester( | 34 node = env.PPAPIBrowserTester( |
35 test_name, | 35 test_name, |
36 url='browser_startup_time.html', | 36 url='browser_startup_time.html', |
37 nmfs=['browser_startup_time.nmf'], | 37 nmfs=['browser_startup_time.nmf'], |
38 files=env.ExtractPublishedFiles(nexe_name), | 38 files=env.ExtractPublishedFiles(nexe_name), |
39 args=['--enable_experimental_js'], | 39 # Smooth out the timing data. |
40 process_output=output_processor, | 40 num_runs='5', |
Nick Bray
2011/11/07 23:39:09
This parameter should be an integer, at least unti
jvoung - send to chromium...
2011/11/09 00:50:54
I'm seeing some weird stuff:
run_browser_startup
jvoung - send to chromium...
2011/11/09 01:00:38
Same thing happens if I go into SConstruct and cha
jvoung - send to chromium...
2011/11/09 17:42:53
Okay, fixed. Is there a better way to detect non-s
| |
41 process_output_single=output_processor_1, | |
42 process_output_combined=output_processor_c, | |
41 # Assume verbosity level of 1 will give us NaClLogs for sel_ldr times. | 43 # Assume verbosity level of 1 will give us NaClLogs for sel_ldr times. |
42 log_verbosity=1) | 44 log_verbosity=1) |
43 | 45 |
44 # TODO(jvoung): use a single test suite when either | 46 # TODO(jvoung): use a single test suite when either |
45 # (a) performance_tests are always run, or | 47 # (a) performance_tests are always run, or |
46 # (b) we have decided to just fold this test into chrome_browser_tests. | 48 # (b) we have decided to just fold this test into chrome_browser_tests. |
47 test_suites = ['chrome_browser_tests', 'performance_tests'] | 49 test_suites = ['chrome_browser_tests', 'performance_tests'] |
48 env.AddNodeToTestSuite(node, | 50 env.AddNodeToTestSuite(node, |
49 test_suites, | 51 test_suites, |
50 'run_browser_startup_time_test', | 52 'run_browser_startup_time_test', |
(...skipping 12 matching lines...) Expand all Loading... | |
63 | 65 |
64 # Check size of stripped nexe. | 66 # Check size of stripped nexe. |
65 browser_startup_stripped_nexe = env.StripExecutable( | 67 browser_startup_stripped_nexe = env.StripExecutable( |
66 stripped_nexe, | 68 stripped_nexe, |
67 browser_startup_nexe) | 69 browser_startup_nexe) |
68 node = env.FileSizeTest('browser_startup_stripped_size.out', | 70 node = env.FileSizeTest('browser_startup_stripped_size.out', |
69 browser_startup_stripped_nexe) | 71 browser_startup_stripped_nexe) |
70 env.AddNodeToTestSuite(node, | 72 env.AddNodeToTestSuite(node, |
71 test_suites, | 73 test_suites, |
72 'run_browser_startup_stripped_size_test') | 74 'run_browser_startup_stripped_size_test') |
OLD | NEW |