angular-cn/tools/ng_benchmark.bzl
Igor Minar c291c8e2cb ci: do not run ng_benchmarks on CI (#34057)
We don't collect/review the results from CI, so it's just a waste of CPU time.

It's sufficient if we are able to run these locally and manually.

PR Close #34057
2019-11-26 16:10:09 -08:00

33 lines
1.1 KiB
Python

# Copyright Google Inc. All Rights Reserved.
#
# Use of this source code is governed by an MIT-style license that can be
# found in the LICENSE file at https://angular.io/license
"""Bazel macro for running Angular benchmarks"""
load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary")
def ng_benchmark(name, bundle):
"""
This macro creates two targets, one that is runnable and prints results and one that can be used for profiling via chrome://inspect.
Args:
name: name of the runnable rule to create
bundle: label of the ng_rollup_bundle to run
"""
nodejs_binary(
name = name,
data = [bundle],
entry_point = bundle + ".min_debug.es2015.js",
tags = ["local", "manual"], # run benchmarks locally and never on CI
)
nodejs_binary(
name = name + "_profile",
data = [bundle],
entry_point = bundle + ".min_debug.es2015.js",
args = ["--node_options=--no-turbo-inlining --node_options=--inspect-brk"],
tags = ["local", "manual"], # run benchmarks locally and never on CI
)