| # Copyright 2026 The Fuchsia Authors. All rights reserved. | |
| # Use of this source code is governed by a BSD-style license that can be | |
| # found in the LICENSE file. | |
| load("//build/bazel/rules/cc:fx_cc_binary.bzl", "fx_cc_binary") | |
| load( | |
| "//build/bazel/rules/components:fx_component.bzl", | |
| "fx_component", | |
| "fx_component_manifest", | |
| ) | |
| load("//build/bazel/rules/packages:fx_package.bzl", "fx_package") | |
| load( | |
| "//build/bazel/rules/packages:fx_packaged_binary.bzl", | |
| "fx_packaged_binary", | |
| ) | |
| package(default_applicable_licenses = ["//:license"]) | |
| fx_cc_binary( | |
| name = "benchmark_example", | |
| srcs = ["main.cc"], | |
| deps = [ | |
| "//sdk/lib/async-loop:async-loop-cpp", | |
| "//sdk/lib/async-loop:async-loop-default", | |
| "//src/lib/fsl", | |
| "//src/lib/fxl", | |
| "//zircon/system/ulib/trace", | |
| "//zircon/system/ulib/trace-provider", | |
| ], | |
| ) | |
| fx_packaged_binary( | |
| name = "benchmark_example_packaged_bin", | |
| binary = ":benchmark_example", | |
| binary_name = "benchmark_example", | |
| ) | |
| fx_component_manifest( | |
| name = "benchmark-manifest", | |
| component_name = "benchmark", | |
| includes = ["//sdk/lib/syslog:client.shard"], | |
| manifest = "meta/benchmark.cml", | |
| ) | |
| fx_component( | |
| name = "benchmark-component", | |
| compiled_manifest = ":benchmark-manifest", | |
| deps = [":benchmark_example_packaged_bin"], | |
| ) | |
| fx_package( | |
| name = "benchmark", | |
| components = [":benchmark-component"], | |
| ) |