angular/tools/ng_benchmark.bzl
Joey Perrott 9dbe6fc18b refactor: update license text to point to angular.dev (#57901)
Update license text to point to angular.dev instead of angular.io

PR Close #57901
2024-09-24 15:33:00 +02:00

32 lines
1 KiB
Python

# 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.dev/license
"""Bazel macro for running Angular benchmarks"""
load("//tools:defaults.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 bundle rule to run
"""
nodejs_binary(
name = name,
data = [bundle],
entry_point = bundle + ".debug.min.js",
tags = ["local", "manual"], # run benchmarks locally and never on CI
)
nodejs_binary(
name = name + "_profile",
data = [bundle],
entry_point = bundle + ".debug.min.js",
args = ["--node_options=--no-turbo-inlining --node_options=--inspect-brk"],
tags = ["local", "manual"], # run benchmarks locally and never on CI
)