angular-cn/modules/benchmarks
Alex Rickabaugh 79466baef8 fix(ivy): remove metadata from *Def and introduce *DefWithMeta types (#26203)
Previously in Ivy, metadata for directives/components/modules/etc was
carried in .d.ts files inside type information encoded on the
DirectiveDef, ComponentDef, NgModuleDef, etc types of Ivy definition
fields. This works well, but has the side effect of complicating Ivy's
runtime code as these extra generic type parameters had to be specified
as <any> throughout the codebase. *DefInternal types were introduced
previously to mitigate this issue, but that's the wrong way to solve
the problem.

This commit returns *Def types to their original form, with no metadata
attached. Instead, new *DefWithMeta types are introduced that alias the
plain definition types and add extra generic parameters. This way the
only code that needs to deal with the extra metadata parameters is the
compiler code that reads and writes them - the existence of this metadata
is transparent to the runtime, as it should be.

PR Close #26203
2018-10-04 10:11:17 -07:00
..
e2e_test test: fix typings for `DoneFn` (#25163) 2018-07-27 11:13:32 -07:00
src fix(ivy): remove metadata from *Def and introduce *DefWithMeta types (#26203) 2018-10-04 10:11:17 -07:00
BUILD.bazel build(bazel): //modules/benchmarks/src/largetable/render3:perf bazel protractor test (#24788) 2018-07-24 08:26:16 -07:00
README.md refactor(benchmarks): add `index_aot` to support AoT bootstrap. (#12105) 2016-10-06 08:37:37 -07:00
favicon.ico refactor(benchmarks): make tree benchmark work again 2016-08-29 12:42:57 -07:00

README.md

How to run the benchmarks locally

Run in the browser

$ build.sh (only needed 1x to copy over third party resources) $ cp -r ./modules/benchmarks ./dist/all/ $ ./node_modules/.bin/tsc -p modules --emitDecoratorMetadata -w $ gulp serve $ open http://localhost:8000/all/benchmarks/src/tree/ng2/index.html?bundles=false

Run e2e tests

export NODE_PATH=(pwd)/dist/all:$(pwd)/dist/tools $ ./node_modules/.bin/protractor protractor-e2e.conf.js --specs=dist/all/benchmarks/e2e_test/tree_spec.js

Options for protractor with protractor-e2e.conf.js:

  • --bundles=true: use prebuilt bundles
  • --ng-help: show all available options

Run benchmarks tests

export NODE_PATH=(pwd)/dist/all:$(pwd)/dist/tools $ ./node_modules/.bin/protractor protractor-perf.conf.js --specs=dist/all/benchmarks/e2e_test/tree_perf.js

Options for protractor with protractor-perf.conf.js:

  • --bundles=true: use prebuilt bundles
  • --ng-help: show all available options

Compile *_aot.ts files

These files are compiled as part of the compiler_cli integration tests. See @angular/compile_cli/integrationtest/tsconfig.json