| # Copyright 2023 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/fuchsia_unittest_package.gni") |
| import("//build/test.gni") |
| import("//build/testing/perf/test.gni") |
| |
| test("udp_serde_benchmarks") { |
| # Don't pessimize the benchmark by opting out of LTO if it's enabled. |
| disable_lto = false |
| sources = [ "main.cc" ] |
| |
| deps = [ |
| "//sdk/lib/fidl/cpp/wire", |
| "//sdk/lib/syslog/cpp", |
| "//src/connectivity/network/netstack/udp_serde", |
| "//src/connectivity/network/netstack/udp_serde:udp_serde_test_util", |
| "//src/lib/fxl", |
| "//zircon/system/ulib/perftest", |
| ] |
| |
| # TODO(https://fxbug.dev/42085293): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-vla-cxx-extension" ] |
| } |
| |
| fuchsia_unittest_package("udp-serde-benchmarks") { |
| manifest = "meta/udp-serde-benchmarks.cml" |
| deps = [ ":udp_serde_benchmarks" ] |
| } |
| |
| fuchsia_component_perf_test("udp_serde_benchmarks_test") { |
| package = ":udp-serde-benchmarks" |
| component_name = "udp-serde-benchmarks" |
| expected_metric_names_filepath = "//src/tests/end_to_end/perf/expected_metric_names/fuchsia.network.udp_serde.txt" |
| test_component_args = [ |
| "-p", |
| "--quiet", |
| ] |
| results_path_test_arg = "--out" |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":udp-serde-benchmarks" ] |
| } |
| |
| group("benchmarks") { |
| testonly = true |
| deps = [ ":udp_serde_benchmarks_test" ] |
| } |