Matias Niemelä 71b400eb7b test(ivy): introduce a benchmark for duplicate map-based style/class bindings ()
Prior to this patch all the styling benchmarks only tested for
template map-based style/class bindings. Because of each of the bindings
being only present in the template, there was no possibility of
there being any duplicate map-based styling bindings.

This benchmark introduces benchmarking for map-based style/class bindings
that are evaluated from both template bindings as well as directives.

This benchmark can be executed by calling:

```
bazel build //packages/core/test/render3/perf:duplicate_map_based_style_and_class_bindings_lib.min_debug.es2015.js

node dist/bin/packages/core/test/render3/perf/duplicate_map_based_style_and_class_bindings_lib.min_debug.es2015.js
```

The benchmark is also run via the `profile_all.js` script (found in
`packages/core/test/render3/perf/`)

PR Close 
2019-11-07 20:34:26 +00:00

205 lines
3.9 KiB
Python

package(default_visibility = ["//visibility:private"])
load("//tools:defaults.bzl", "jasmine_node_test", "ng_benchmark", "ng_rollup_bundle", "ts_library")
ts_library(
name = "perf_lib",
srcs = glob(
["**/*.ts"],
),
deps = [
"//packages/core",
"@npm//@types/jasmine",
"@npm//@types/node",
],
)
jasmine_node_test(
name = "perf",
deps = [
":perf_lib",
],
)
ng_rollup_bundle(
name = "class_binding_lib",
entry_point = ":class_binding/index.ts",
deps = [
":perf_lib",
],
)
ng_benchmark(
name = "class_binding",
bundle = ":class_binding_lib",
)
ng_rollup_bundle(
name = "directive_instantiate_lib",
entry_point = ":directive_instantiate/index.ts",
deps = [
":perf_lib",
],
)
ng_benchmark(
name = "directive_instantiate",
bundle = ":directive_instantiate_lib",
)
ng_rollup_bundle(
name = "element_text_create_lib",
entry_point = ":element_text_create/index.ts",
deps = [
":perf_lib",
],
)
ng_benchmark(
name = "element_text_create",
bundle = ":element_text_create_lib",
)
ng_rollup_bundle(
name = "interpolation_lib",
entry_point = ":interpolation/index.ts",
deps = [
":perf_lib",
],
)
ng_benchmark(
name = "interpolation",
bundle = ":interpolation_lib",
)
ng_rollup_bundle(
name = "listeners_lib",
entry_point = ":listeners/index.ts",
deps = [
":perf_lib",
],
)
ng_benchmark(
name = "listeners",
bundle = ":listeners_lib",
)
ng_rollup_bundle(
name = "noop_change_detection_lib",
entry_point = ":noop_change_detection/index.ts",
deps = [
":perf_lib",
],
)
ng_benchmark(
name = "noop_change_detection",
bundle = ":noop_change_detection_lib",
)
ng_rollup_bundle(
name = "ng_template_lib",
entry_point = ":ng_template/index.ts",
deps = [
":perf_lib",
],
)
ng_benchmark(
name = "ng_template",
bundle = ":ng_template_lib",
)
ng_rollup_bundle(
name = "property_binding_lib",
entry_point = ":property_binding/index.ts",
deps = [
":perf_lib",
],
)
ng_benchmark(
name = "property_binding",
bundle = ":property_binding_lib",
)
ng_rollup_bundle(
name = "property_binding_update_lib",
entry_point = ":property_binding_update/index.ts",
deps = [
":perf_lib",
],
)
ng_benchmark(
name = "property_binding_update",
bundle = ":property_binding_update_lib",
)
ng_rollup_bundle(
name = "style_binding_lib",
entry_point = ":style_binding/index.ts",
deps = [
":perf_lib",
],
)
ng_benchmark(
name = "style_binding",
bundle = ":style_binding_lib",
)
ng_rollup_bundle(
name = "style_and_class_bindings_lib",
entry_point = ":style_and_class_bindings/index.ts",
deps = [
":perf_lib",
],
)
ng_benchmark(
name = "style_and_class_bindings",
bundle = ":style_and_class_bindings_lib",
)
ng_rollup_bundle(
name = "map_based_style_and_class_bindings_lib",
entry_point = ":map_based_style_and_class_bindings/index.ts",
deps = [
":perf_lib",
],
)
ng_benchmark(
name = "map_based_style_and_class_bindings",
bundle = ":map_based_style_and_class_bindings_lib",
)
ng_rollup_bundle(
name = "duplicate_style_and_class_bindings_lib",
entry_point = ":duplicate_style_and_class_bindings/index.ts",
deps = [
":perf_lib",
],
)
ng_benchmark(
name = "duplicate_style_and_class_bindings",
bundle = ":duplicate_style_and_class_bindings_lib",
)
ng_rollup_bundle(
name = "duplicate_map_based_style_and_class_bindings_lib",
entry_point = ":duplicate_map_based_style_and_class_bindings/index.ts",
deps = [
":perf_lib",
],
)
ng_benchmark(
name = "duplicate_map_based_style_and_class_bindings",
bundle = ":duplicate_map_based_style_and_class_bindings_lib",
)