| # Copyright 2024 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/testing/perf/test.gni") |
| |
| executable("tracee_bin") { |
| output_name = "tracee" |
| testonly = true |
| sources = [ "tracee.cc" ] |
| deps = [ |
| "//sdk/lib/syslog/cpp:cpp", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/trace", |
| "//zircon/system/ulib/trace-provider", |
| ] |
| } |
| |
| fuchsia_component("tracee") { |
| testonly = true |
| manifest = "meta/tracee.cml" |
| deps = [ ":tracee_bin" ] |
| } |
| |
| executable("trace_system_benchmarks_bin") { |
| output_name = "trace_system_benchmarks" |
| testonly = true |
| sources = [ "streaming_throughput.cc" ] |
| deps = [ |
| "//sdk/fidl/fuchsia.tracing.controller:fuchsia.tracing.controller_cpp", |
| "//sdk/lib/component/incoming/cpp", |
| "//sdk/lib/syslog/cpp:cpp", |
| "//zircon/system/ulib/async:async-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/perftest", |
| "//zircon/system/ulib/trace", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| executable("trace_system_benchmarks_many_providers_bin") { |
| output_name = "trace_system_benchmarks_many_providers" |
| testonly = true |
| sources = [ "configure.cc" ] |
| deps = [ |
| "//sdk/fidl/fuchsia.tracing.controller:fuchsia.tracing.controller_cpp", |
| "//sdk/lib/component/incoming/cpp", |
| "//sdk/lib/syslog/cpp:cpp", |
| "//zircon/system/ulib/async:async-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/perftest", |
| "//zircon/system/ulib/trace", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| fuchsia_test_component("trace-system-throughput-benchmarks") { |
| manifest = "meta/trace_bench.cml" |
| deps = [ ":trace_system_benchmarks_bin" ] |
| } |
| |
| fuchsia_test_component("trace-system-configuration-benchmarks") { |
| manifest = "meta/trace_bench_many_providers.cml" |
| deps = [ ":trace_system_benchmarks_many_providers_bin" ] |
| } |
| |
| fuchsia_test_package("trace_system_throughput_benchmarks_standalone") { |
| test_components = [ ":trace-system-throughput-benchmarks" ] |
| deps = [ |
| ":tracee", |
| "//src/performance/trace_manager:component_hermetic", |
| ] |
| } |
| |
| fuchsia_test_package("trace_system_configuration_benchmarks_standalone") { |
| test_components = [ ":trace-system-configuration-benchmarks" ] |
| deps = [ |
| ":tracee", |
| "//src/performance/trace_manager:component_hermetic", |
| ] |
| } |
| |
| fuchsia_component_perf_test("trace_system_throughput_benchmarks") { |
| package = ":trace_system_throughput_benchmarks_standalone" |
| component_name = "trace-system-throughput-benchmarks" |
| |
| # We run the throughput benchmarks with fewer runs as they take longer to complete |
| process_runs = 2 |
| test_component_args = [ |
| "-p", |
| "--quiet", |
| "--runs", |
| "20", |
| ] |
| expected_metric_names_filepath = "//src/tests/end_to_end/perf/expected_metric_names/fuchsia.trace_system.throughput.txt" |
| results_path_test_arg = "--out" |
| } |
| |
| fuchsia_component_perf_test("trace_system_configuration_benchmarks") { |
| package = ":trace_system_configuration_benchmarks_standalone" |
| component_name = "trace-system-configuration-benchmarks" |
| process_runs = 6 |
| test_component_args = [ |
| "-p", |
| "--quiet", |
| "--runs", |
| "120", |
| ] |
| expected_metric_names_filepath = "//src/tests/end_to_end/perf/expected_metric_names/fuchsia.trace_system.configuration.txt" |
| results_path_test_arg = "--out" |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":trace_system_configuration_benchmarks_standalone", |
| ":trace_system_throughput_benchmarks_standalone", |
| ] |
| } |
| |
| group("benchmarks") { |
| testonly = true |
| deps = [ |
| ":trace_system_configuration_benchmarks", |
| ":trace_system_throughput_benchmarks", |
| ] |
| } |