angular/modules/benchmarks
Kristiyan Kostadinov 81cabc1477 feat(core): add support for TypeScript 6
Updates the project to support TypeScript 6 and accounts for some of the breakages.
2026-02-17 08:40:38 -08:00
..
src feat(core): add support for TypeScript 6 2026-02-17 08:40:38 -08:00
benchmark_test.bzl build: move from using WORKSPACE to MODULE.bazel (#63246) 2025-08-20 08:26:17 +00:00
BUILD.bazel build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
e2e_test.bzl build: move from using WORKSPACE to MODULE.bazel (#63246) 2025-08-20 08:26:17 +00:00
README.md build: format md files 2025-11-06 10:03:05 -08:00
tsconfig-build.json build: initial test of TypeScript 6 2026-01-15 13:41:01 -08:00
tsconfig-e2e.json build: initial test of TypeScript 6 2026-01-15 13:41:01 -08:00
tsconfig.json test: use zone from npm instead of the locally built package for modules testing (#61947) 2025-06-06 15:20:11 -07:00

How to run the benchmarks locally

Run in the browser

pnpm bazel run modules/benchmarks/src/tree/{name}:devserver

# e.g. "ng2" tree benchmark:
pnpm bazel run modules/benchmarks/src/tree/ng2:devserver

Run e2e tests

# Run e2e tests of individual applications:
pnpm bazel test modules/benchmarks/src/tree/ng2/...

# Run all e2e tests:
pnpm 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 until scriptTime predictively no longer decreases. It does this by using a simple linear regression with the amount of samples specified. Defaults to 20 samples.
  • PERF_FORCE_GC: If set to true, @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 to true, no results are printed and stored in a json 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:

pnpm bazel test modules/benchmarks/src/tree/baseline:perf --test_env=PERF_DRYRUN=true