|  | # Copyright 2020 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. | 
|  |  | 
|  | import("//build/components.gni") | 
|  | import("//build/fidl/fidl.gni") | 
|  | import("//build/testing/environments.gni") | 
|  | import("//src/tests/benchmarks/fidl/benchmark_suite/benchmark_suite.gni") | 
|  | import("//tools/fidl/gidl/gidl.gni") | 
|  |  | 
|  | template("hlcpp_gidl_benchmark_suite") { | 
|  | gidl_hlcpp_benchmarks(target_name) { | 
|  | testonly = true | 
|  | inputs = invoker.gidl | 
|  | fidl = invoker.fidl_target | 
|  | deps = [ | 
|  | "//sdk/ctf/tests/pkg/fidl/cpp:handle_util", | 
|  | "//sdk/lib/fidl", | 
|  | "//zircon/system/ulib/async-loop:async-loop-cpp", | 
|  | "//zircon/system/ulib/async-loop:async-loop-default", | 
|  | "//zircon/system/ulib/perftest", | 
|  | "//zircon/system/ulib/sync:sync-cpp", | 
|  | ] | 
|  | extra_args = [ | 
|  | "-cpp-benchmarks-fidl-library", | 
|  | invoker.fidl_library_suffix, | 
|  | ] | 
|  | } | 
|  | } | 
|  |  | 
|  | gidl_deps = [] | 
|  | foreach(suite, benchmark_suites) { | 
|  | suite_target = "benchmark_suite__${suite.name}" | 
|  | gidl_deps += [ ":" + suite_target ] | 
|  |  | 
|  | hlcpp_gidl_benchmark_suite(suite_target) { | 
|  | gidl = suite.gidl | 
|  | fidl_target = suite.fidl_target | 
|  | fidl_library_suffix = suite.fidl_library_suffix | 
|  | } | 
|  | } | 
|  |  | 
|  | executable("bin") { | 
|  | output_name = "hlcpp_fidl_microbenchmarks" | 
|  | testonly = true | 
|  | sources = [ "main.cc" ] | 
|  | deps = [ | 
|  | "//sdk/lib/fidl", | 
|  | "//sdk/lib/fidl/cpp", | 
|  | "//src/zircon/lib/zircon", | 
|  | "//zircon/system/ulib/perftest", | 
|  | ] + gidl_deps | 
|  | } | 
|  |  | 
|  | fuchsia_shell_package("hlcpp") { | 
|  | testonly = true | 
|  | deps = [ ":bin" ] | 
|  | } |