| # 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.gni") |
| import("//build/rust/rustc_binary.gni") |
| |
| rustc_binary("bin") { |
| output_name = "trace_thread_stress" |
| edition = "2021" |
| sources = [ "src/main.rs" ] |
| deps = [ |
| ":stress_config_rust", |
| "//src/lib/trace/rust:trace", |
| "//src/lib/trace/rust:trace-provider", |
| "//third_party/rust_crates:anyhow", |
| ] |
| } |
| |
| fuchsia_component_manifest("manifest") { |
| component_name = "trace_thread_stress" |
| manifest = "meta/trace_thread_stress.cml" |
| } |
| |
| fuchsia_component("stress") { |
| component_name = "trace_thread_stress" |
| cm_label = ":manifest" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_structured_config_values("config") { |
| cm_label = ":manifest" |
| values = { |
| thread_count = 100 |
| duration_ms = 10000 |
| interval_ms = 10 |
| } |
| } |
| |
| fuchsia_structured_config_rust_lib("stress_config_rust") { |
| cm_label = ":manifest" |
| } |
| |
| fuchsia_package("trace_thread_stress") { |
| deps = [ |
| ":config", |
| ":stress", |
| ] |
| } |