Skip to content

Commit 7561711

Browse files
committed
test: add AIO benchmark
1 parent ae446b9 commit 7561711

File tree

8 files changed

+20379
-11571
lines changed

8 files changed

+20379
-11571
lines changed

.circleci/config.yml

+18
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# `com_github_bazelbuild_buildtools` in the `/WORKSPACE` file.
1515
var_1: &docker_image angular/ngcontainer:0.3.3
1616
var_2: &cache_key angular_devkit-{{ checksum "yarn.lock" }}-0.3.3-2
17+
var_3: &benchmark_aio_cache_key angular_devkit-benchmark-aio{{ checksum "benchmark/aio/package-lock.json" }}-0.3.3-2
1718

1819
# Settings common to each job
1920
anchor_1: &defaults
@@ -30,6 +31,8 @@ anchor_3: &root_package_lock_key
3031
key: *cache_key
3132
anchor_4: &attach_options
3233
at: .
34+
anchor_5: &benchmark_aio_package_lock_key
35+
key: *benchmark_aio_cache_key
3336

3437
# Job definitions
3538
version: 2
@@ -93,6 +96,18 @@ jobs:
9396
- attach_workspace: *attach_options
9497
- run: npm run admin -- build
9598

99+
benchmark:
100+
<<: *defaults
101+
steps:
102+
- attach_workspace: *attach_options
103+
- restore_cache: *benchmark_aio_package_lock_key
104+
- run: npm run admin -- build
105+
- run: npm run benchmark
106+
- save_cache:
107+
<<: *benchmark_aio_package_lock_key
108+
paths:
109+
- benchmark/aio/node_modules
110+
96111
build-bazel:
97112
<<: *defaults
98113
resource_class: large
@@ -155,6 +170,9 @@ workflows:
155170
- e2e-cli:
156171
requires:
157172
- build
173+
- benchmark:
174+
requires:
175+
- build
158176
- snapshot_publish:
159177
requires:
160178
- test

benchmark/aio/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,5 @@ Thumbs.db
4747

4848
# copied dependencies
4949
# src/assets/js/lunr*
50+
51+
benchmark.log

benchmark/aio/BENCHMARK.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Benchmark notes for AIO
2+
3+
## Snapshot info
4+
Repository: https://github.com/angular/angular (inside the `aio` folder)
5+
Commit: 268cf7989 docs: release notes for the v6.1.5 release
6+
7+
## Running the benchmark
8+
9+
```
10+
npm install
11+
npm run benchmark
12+
```
13+
14+
## Modifications
15+
- Added devDependency `"@angular-devkit/benchmark": "file:../../dist/@angular-devkit_benchmark.tgz",`
16+
- Added devDependency `"@angular-devkit/build-angular": "file:../../dist/@angular-devkit_build-angular.tgz",`
17+
- Removed devDependency `"@angular-devkit/build-angular": "0.6.7",`
18+
- Removed npm script `"preinstall": "node ../tools/yarn/check-yarn.js",`
19+
- Added npm script `"benchmark": "benchmark --output-file=benchmark.log -- ng build --configuration=stable",`
20+
- Added artifacts from `yarn setup` to git (`/src/generated/` and `src/assets/js`)
21+
- Unignored artifacts from `yarn setup` in gitignore
22+
- Ignore `benchmark.log` in gitignore
23+
24+
## Notes
25+
This benchmark does not run the `setup` script because it has prebuilt its artifacts (
26+
`/src/generated/` and `src/assets/js`).
27+
28+
The original repository uses `yarn` instead of `npm`, but adding local file paths to `package.json`
29+
seems to make yarn hang so we used `npm` instead.

0 commit comments

Comments
 (0)