blob: 911d6d6a07053def324ff213fc05c3702eb22b57 [file] [log] [blame]
# 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")
fuchsia_component_manifest("tracee_manifest") {
component_name = "tracee"
manifest = "meta/tracee.cml"
}
fuchsia_structured_config_cpp_elf_lib("tracee_config") {
cm_label = ":tracee_manifest"
}
executable("tracee_bin") {
output_name = "tracee"
testonly = true
sources = [ "tracee.cc" ]
deps = [
":tracee_config",
"//sdk/lib/async-loop:async-loop-cpp",
"//sdk/lib/async-loop:async-loop-default",
"//sdk/lib/syslog/cpp",
"//zircon/system/ulib/trace",
"//zircon/system/ulib/trace-provider",
]
}
fuchsia_component("tracee") {
cm_label = ":tracee_manifest"
testonly = true
deps = [ ":tracee_bin" ]
}
fuchsia_structured_config_values("without_trace_data") {
cm_label = ":tracee_manifest"
values = {
emit_trace_data = false
}
}
fuchsia_structured_config_values("with_trace_data") {
cm_label = ":tracee_manifest"
values = {
emit_trace_data = true
}
}
executable("trace_system_benchmarks_bin") {
output_name = "trace_system_benchmarks"
testonly = true
sources = [ "streaming_throughput.cc" ]
deps = [
":with_trace_data",
"//sdk/fidl/fuchsia.tracing.controller:fuchsia.tracing.controller_cpp",
"//sdk/lib/async:async-cpp",
"//sdk/lib/async-loop:async-loop-cpp",
"//sdk/lib/async-loop:async-loop-default",
"//sdk/lib/component/incoming/cpp",
"//sdk/lib/syslog/cpp",
"//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 = [
":without_trace_data",
"//sdk/fidl/fuchsia.tracing.controller:fuchsia.tracing.controller_cpp",
"//sdk/lib/async:async-cpp",
"//sdk/lib/async-loop:async-loop-cpp",
"//sdk/lib/async-loop:async-loop-default",
"//sdk/lib/component/incoming/cpp",
"//sdk/lib/syslog/cpp",
"//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",
]
}