Skip to content

Commit 63ce656

Browse files
committed
Add test_new_branch.bat
Add a batch file for easy comparing of build times for Chrome. It does a full build of Chrome (defaulting to 24-way parallelism, tweak as needed) first from origin/master, and then from the specified branch. An optional revision number argument can be specified to give more context for the results, but the revision number specified does not affect what code is built.
1 parent dcde620 commit 63ce656

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
@setlocal
2+
3+
where cl
4+
if errorlevel 1 goto no_cl_is_good
5+
@echo Make sure cl.exe (VC++ compiler) is *not* in the path when
6+
@echo running this.
7+
exit /b
8+
:no_cl_is_good
9+
10+
if not "%1" == "" goto found_arg
11+
@echo Specify the branch name to test. Optionally specify a revision.
12+
@echo usage: test_new_branch.bat test_branch R758223
13+
exit /b
14+
:found_arg
15+
16+
17+
set script=%~dp0analyze_chrome.py
18+
19+
set branch_name=%1
20+
@rem Optionally set this to a revision number such as R758223
21+
set revision=head
22+
if "%2" == "" goto no_revision_set
23+
set revision=%2
24+
:no_revision_set
25+
26+
27+
28+
@rem First build Chromium with the default code.
29+
call git checkout origin/master
30+
call gn gen out\debug_component --args="is_debug=true is_component_build=true enable_nacl=false target_cpu=\"x86\" blink_symbol_level=1"
31+
cd out\debug_component
32+
call gn clean .
33+
call ninja.exe -j 24 chrome
34+
copy .ninja_log ..\..\.ninja_log_default_%revision% /y
35+
call python %script% > ..\..\%revision%-default.csv
36+
cd ..\..
37+
38+
39+
40+
@rem Then build Chromium with updated code.
41+
call git checkout %branch_name%
42+
call gn gen out\debug_component2 --args="is_debug=true is_component_build=true enable_nacl=false target_cpu=\"x86\" blink_symbol_level=1"
43+
cd out\debug_component2
44+
call gn clean .
45+
call ninja.exe -j 24 chrome
46+
copy .ninja_log ..\..\.ninja_log_%branch_name%_%revision% /y
47+
call python %script% > ..\..\%revision%-%branch_name%.csv
48+
cd ..\..

0 commit comments

Comments
 (0)