perf(ivy): run tree benchmark with bundles and ngDevMode off (#32558)

PR Close #32558
This commit is contained in:
Pawel Kozlowski 2019-09-09 15:11:23 +02:00 committed by Matias Niemelä
parent 2895edc9c6
commit c3a1ef219e
1 changed files with 13 additions and 10 deletions

View File

@ -1,4 +1,4 @@
load("//tools:defaults.bzl", "ng_module") load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle")
load("@npm_bazel_typescript//:index.bzl", "ts_devserver") load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test") load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
@ -22,25 +22,28 @@ ng_module(
], ],
) )
ng_rollup_bundle(
name = "bundle",
entry_point = ":index_aot.ts",
deps = [
":ng2",
"@npm//rxjs",
],
)
ts_devserver( ts_devserver(
name = "devserver", name = "prodserver",
entry_module = "angular/modules/benchmarks/src/tree/ng2/index",
index_html = "index.html", index_html = "index.html",
port = 4200, port = 4200,
scripts = [
"@npm//:node_modules/tslib/tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = [ static_files = [
":bundle.min_debug.es2015.js",
"@npm//:node_modules/zone.js/dist/zone.js", "@npm//:node_modules/zone.js/dist/zone.js",
"@npm//:node_modules/reflect-metadata/Reflect.js",
], ],
deps = [":ng2"],
) )
benchmark_test( benchmark_test(
name = "perf", name = "perf",
server = ":devserver", server = ":prodserver",
deps = [ deps = [
"//modules/benchmarks/src/tree:perf_detect_changes_lib", "//modules/benchmarks/src/tree:perf_detect_changes_lib",
"//modules/benchmarks/src/tree:perf_lib", "//modules/benchmarks/src/tree:perf_lib",