https://github.com/angular/angular
Revision 2632510f87d587a2de4e124d241b9dbe74cbe451 authored by Gustav Bylund on 02 October 2020, 10:35:47 UTC, committed by Alex Rickabaugh on 28 October 2020, 17:53:17 UTC
Also uses fixed git hashes so the line numbers won't get outdated in the
future

PR Close #39093
1 parent f61ac8a
Raw File
Tip revision: 2632510f87d587a2de4e124d241b9dbe74cbe451 authored by Gustav Bylund on 02 October 2020, 10:35:47 UTC
docs: fix links to Material examples (#39093)
Tip revision: 2632510
ng_benchmark.bzl
# Copyright Google LLC 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.js",
        tags = ["local", "manual"],  # run benchmarks locally and never on CI
    )

    nodejs_binary(
        name = name + "_profile",
        data = [bundle],
        entry_point = bundle + ".min_debug.js",
        args = ["--node_options=--no-turbo-inlining --node_options=--inspect-brk"],
        tags = ["local", "manual"],  # run benchmarks locally and never on CI
    )
back to top