583a9d38a1
Close #35157
In the current version of zone.js, zone.js uses it's own package format, and it is not following the rule
of Angualr package format(APF), so it is not easily to be consumed by Angular CLI or other bundle tools.
For example, zone.js npm package has two bundles,
1. zone.js/dist/zone.js, this is a `es5` bundle.
2. zone.js/dist/zone-evergreen.js, this is a `es2015` bundle.
And Angular CLI has to add some hard-coding code to handle this case, o
|
||
---|---|---|
.. | ||
src | ||
BUILD.bazel | ||
README.md | ||
e2e_test.bzl | ||
tsconfig-build.json | ||
tsconfig-e2e.json | ||
tsconfig.json |
README.md
How to run the benchmarks locally
Run in the browser
yarn bazel run modules/benchmarks/src/tree/{name}:devserver
# e.g. "ng2" tree benchmark:
yarn bazel run modules/benchmarks/src/tree/ng2:devserver
Run e2e tests
# Run e2e tests of individual applications:
yarn bazel test modules/benchmarks/src/tree/ng2/...
# Run all e2e tests:
yarn bazel test modules/benchmarks/...
Use of *_aot.ts files
The *_aot.ts
files are used as entry-points within Google to run the benchmark
tests. These are still built as part of the corresponding ng_module
rule.
Specifying benchmark options
There are options that can be specified in order to control how a given benchmark target runs. The following options can be set through test environment variables:
PERF_SAMPLE_SIZE
: Benchpress performs measurements untilscriptTime
predictively no longer decreases. It does this by using a simple linear regression with the amount of samples specified. Defaults to20
samples.PERF_FORCE_GC
: If set totrue
,@angular/benchpress
will run run the garbage collector before and after performing measurements. Benchpress will measure and report the garbage collection time.PERF_DRYRUN
: If set totrue
, no results are printed and stored in ajson
file. Also benchpress only performs a single measurement (unlike with the simple linear regression).
Here is an example command that sets the PERF_DRYRUN
option:
yarn bazel test modules/benchmarks/src/tree/baseline:perf --test_env=PERF_DRYRUN=true