From 5f1f42ba547545082b3f5ed223ebab4969696054 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 8 Jan 2020 18:06:07 +0100 Subject: [PATCH] test: run styling benchmarks in benchpress (#34664) Runs the styling benchmarks that have been added with 2e0b237646863562e336f370372b4b7f9e52d818 in benchpress. The goal is that these benchmarks can be wired up in Latency Lab. PR Close #34664 --- modules/benchmarks/src/styling/BUILD.bazel | 16 +++- .../benchmarks/src/styling/ng2/BUILD.bazel | 7 ++ modules/benchmarks/src/styling/ng2/index.html | 5 +- .../src/styling/styling_perf.spec.ts | 74 +++++++++++++++++++ 4 files changed, 99 insertions(+), 3 deletions(-) create mode 100644 modules/benchmarks/src/styling/styling_perf.spec.ts diff --git a/modules/benchmarks/src/styling/BUILD.bazel b/modules/benchmarks/src/styling/BUILD.bazel index ffd0fb0cdc..430bfa99fb 100644 --- a/modules/benchmarks/src/styling/BUILD.bazel +++ b/modules/benchmarks/src/styling/BUILD.bazel @@ -1 +1,15 @@ -package(default_visibility = ["//visibility:public"]) +package(default_visibility = ["//modules/benchmarks:__subpackages__"]) + +load("//tools:defaults.bzl", "ts_library") + +ts_library( + name = "tests_lib", + testonly = True, + srcs = ["styling_perf.spec.ts"], + tsconfig = "//modules/benchmarks:tsconfig-e2e.json", + deps = [ + "//modules/e2e_util", + "@npm//@types/jasminewd2", + "@npm//protractor", + ], +) diff --git a/modules/benchmarks/src/styling/ng2/BUILD.bazel b/modules/benchmarks/src/styling/ng2/BUILD.bazel index 1161e99eaf..4f077ae02b 100644 --- a/modules/benchmarks/src/styling/ng2/BUILD.bazel +++ b/modules/benchmarks/src/styling/ng2/BUILD.bazel @@ -1,4 +1,5 @@ load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle", "ts_devserver") +load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test") package(default_visibility = ["//modules/benchmarks:__subpackages__"]) @@ -30,3 +31,9 @@ ts_devserver( static_files = ["index.html"], deps = [":bundle.min_debug.es2015.js"], ) + +benchmark_test( + name = "perf", + server = ":prodserver", + deps = ["//modules/benchmarks/src/styling:tests_lib"], +) diff --git a/modules/benchmarks/src/styling/ng2/index.html b/modules/benchmarks/src/styling/ng2/index.html index e2a01fab21..810286db3f 100644 --- a/modules/benchmarks/src/styling/ng2/index.html +++ b/modules/benchmarks/src/styling/ng2/index.html @@ -11,9 +11,10 @@

Styling bindings benchmark