| # 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/rust/rustc_binary.gni") |
| import("//build/testing/perf/test.gni") |
| import("//src/diagnostics/archivist/build/archivist.gni") |
| |
| archivist_optimized_binary("logging-bin") { |
| output_name = "archivist_logging_benchmarks" |
| edition = "2018" |
| |
| source_root = "src/logging.rs" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_rust", |
| "//sdk/rust/zx", |
| "//src/developer/fuchsia-criterion", |
| "//src/diagnostics/archivist:lib", |
| "//src/lib/diagnostics/log/encoding/rust", |
| "//src/lib/diagnostics/log/types", |
| "//src/lib/fuchsia-async", |
| "//src/sys/lib/moniker", |
| "//third_party/rust_crates:futures", |
| ] |
| |
| sources = [ "src/logging.rs" ] |
| } |
| |
| rustc_binary("logging-e2e-bin") { |
| testonly = true |
| name = "archivist_logging_e2e_benchmarks" |
| edition = "2018" |
| |
| source_root = "src/logging_e2e.rs" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_rust", |
| "//sdk/fidl/fuchsia.logger:fuchsia.logger_rust", |
| "//src/developer/fuchsia-criterion", |
| "//src/lib/diagnostics/log/rust", |
| "//src/lib/diagnostics/reader/rust", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component-test", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:log", |
| ] |
| |
| sources = [ "src/logging_e2e.rs" ] |
| } |
| |
| archivist_optimized_binary("formatter-bin") { |
| output_name = "archivist_formatter_benchmarks" |
| edition = "2018" |
| |
| source_root = "src/formatter.rs" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_rust", |
| "//src/developer/fuchsia-criterion", |
| "//src/diagnostics/archivist:lib", |
| "//src/lib/diagnostics/data/rust", |
| "//src/lib/diagnostics/hierarchy/rust", |
| "//src/lib/fuchsia-async", |
| "//third_party/rust_crates:futures", |
| ] |
| |
| sources = [ "src/formatter.rs" ] |
| } |
| |
| _formatter_benchmark_component = "formatter" |
| _logging_benchmark_component = "logging" |
| _logging_e2e_benchmark_component = "logging_e2e" |
| |
| fuchsia_component("formatter-benchmarks-component") { |
| component_name = _formatter_benchmark_component |
| deps = [ ":formatter-bin" ] |
| manifest = "meta/formatter.cml" |
| } |
| |
| fuchsia_component("logging-benchmarks-component") { |
| component_name = _logging_benchmark_component |
| deps = [ ":logging-bin" ] |
| manifest = "meta/logging.cml" |
| } |
| |
| fuchsia_component("logging-e2e-benchmarks-component") { |
| testonly = true |
| component_name = _logging_e2e_benchmark_component |
| deps = [ ":logging-e2e-bin" ] |
| manifest = "meta/logging_e2e.cml" |
| } |
| |
| fuchsia_package("archivist-benchmarks") { |
| testonly = true |
| deps = [ |
| ":formatter-benchmarks-component", |
| ":logging-benchmarks-component", |
| ":logging-e2e-benchmarks-component", |
| ] |
| subpackages = [ "//src/diagnostics/archivist:archivist-for-embedding" ] |
| } |
| |
| fuchsia_component_perf_test("archivist-formatter-benchmark") { |
| package = ":archivist-benchmarks" |
| component_name = _formatter_benchmark_component |
| expected_metric_names_filepath = "//src/tests/end_to_end/perf/expected_metric_names/fuchsia.archivist.formatter.txt" |
| } |
| |
| fuchsia_component_perf_test("archivist-logging-benchmark") { |
| package = ":archivist-benchmarks" |
| component_name = _logging_benchmark_component |
| expected_metric_names_filepath = "//src/tests/end_to_end/perf/expected_metric_names/fuchsia.archivist.logging.txt" |
| } |
| |
| fuchsia_component_perf_test("archivist-logging-e2e-benchmark") { |
| package = ":archivist-benchmarks" |
| component_name = _logging_e2e_benchmark_component |
| expected_metric_names_filepath = "//src/tests/end_to_end/perf/expected_metric_names/fuchsia.archivist.logging_e2e.txt" |
| } |
| |
| group("build-only") { |
| testonly = true |
| deps = [ |
| ":formatter-benchmarks-component", |
| ":logging-benchmarks-component", |
| ":logging-e2e-benchmarks-component", |
| ] |
| } |
| |
| group("bench") { |
| testonly = true |
| deps = [ |
| ":archivist-formatter-benchmark", |
| ":archivist-logging-benchmark", |
| ":archivist-logging-e2e-benchmark", |
| ] |
| } |