blob: 5e9ffc0d095306f2aa5499a1173ca4d32c75c396 [file] [log] [blame] [edit]
# Copyright 2019 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")
rustc_binary("reader-bin") {
name = "inspect_rust_reader_benchmarks"
edition = "2018"
with_unit_tests = true
source_root = "src/reader.rs"
deps = [
"//sdk/fidl/fuchsia.inspect:fuchsia.inspect_rust",
"//src/developer/fuchsia-criterion",
"//src/lib/diagnostics/inspect/runtime/rust",
"//src/lib/diagnostics/inspect/rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
]
sources = [
"src/reader.rs",
"src/utils.rs",
]
}
rustc_binary("writer-bin") {
name = "inspect_rust_writer_benchmarks"
edition = "2018"
source_root = "src/writer.rs"
deps = [
"//sdk/fidl/fuchsia.inspect:fuchsia.inspect_rust",
"//src/developer/fuchsia-criterion",
"//src/lib/diagnostics/inspect/format/rust",
"//src/lib/diagnostics/inspect/runtime/rust",
"//src/lib/diagnostics/inspect/rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:num",
"//third_party/rust_crates:once_cell",
"//third_party/rust_crates:paste",
"//third_party/rust_crates:rand",
]
sources = [
"src/utils.rs",
"src/writer.rs",
]
}
rustc_binary("snapshot-filter-bin") {
name = "inspect_rust_snapshot_filter_benchmarks"
edition = "2021"
source_root = "src/snapshot_filter.rs"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_rust",
"//src/developer/fuchsia-criterion",
"//src/lib/diagnostics/inspect/rust",
"//src/lib/diagnostics/selectors",
"//third_party/rust_crates:lazy_static",
"//third_party/rust_crates:rand",
]
test_deps = [
"//src/lib/fuchsia",
"//third_party/rust_crates:pretty_assertions",
]
sources = [
"src/snapshot_filter.rs",
"src/utils.rs",
]
}
fuchsia_component("reader-component") {
component_name = "reader"
manifest = "meta/reader.cml"
deps = [ ":reader-bin" ]
}
fuchsia_component("writer-component") {
component_name = "writer"
manifest = "meta/writer.cml"
deps = [ ":writer-bin" ]
}
fuchsia_component("snapshot-filter-component") {
component_name = "snapshot_filter"
manifest = "meta/snapshot_filter.cml"
deps = [ ":snapshot-filter-bin" ]
}
fuchsia_package("rust-inspect-benchmarks") {
deps = [
":reader-component",
":snapshot-filter-component",
":writer-component",
]
}
fuchsia_unittest_package("rust-inspect-benchmarks-test") {
deps = [ ":snapshot-filter-bin_test" ]
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
}
group("bench") {
testonly = true
deps = [ ":rust-inspect-benchmarks" ]
}
group("tests") {
testonly = true
deps = [ ":rust-inspect-benchmarks-test" ]
}