| # Copyright 2021 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("//src/developer/ffx/build/ffx_plugin.gni") | |
| import("//src/developer/ffx/build/ffx_tool.gni") | |
| if (is_host) { | |
| ffx_plugin("ffx_profile") { | |
| sdk_category = "not-yet-specified" | |
| version = "0.1.0" | |
| edition = "2024" | |
| plugin_deps = [ | |
| "cpu:ffx_profile_cpu", | |
| "gpu:ffx_profile_gpu", | |
| "heapdump:ffx_profile_heapdump", | |
| "memory:ffx_profile_memory", | |
| "network:ffx_profile_network", | |
| "power:ffx_profile_power", | |
| "stacktrack:ffx_profile_stacktrack", | |
| "temperature:ffx_profile_temperature", | |
| ] | |
| args_sources = [ "src/args.rs" ] | |
| args_deps = [ | |
| "//src/developer/ffx/core:lib", | |
| "//third_party/rust_crates:argh", | |
| ] | |
| } | |
| ffx_tool("ffx_profile_tool") { | |
| edition = "2024" | |
| output_name = "ffx-profile" | |
| deps = [ | |
| ":ffx_profile_suite", | |
| "//src/lib/fuchsia-async", | |
| ] | |
| sources = [ "src/main.rs" ] | |
| sdk_target_name = "sdk" | |
| sdk_category = "partner" | |
| } | |
| group("host_tests") { | |
| testonly = true | |
| deps = [ | |
| "heapdump:host_tests", | |
| "stacktrack:host_tests", | |
| ] | |
| } | |
| group("profile") { | |
| public_deps = [ | |
| ":ffx_profile_tool", | |
| ":ffx_profile_tool_host_tool", | |
| ] | |
| } | |
| group("bin") { | |
| public_deps = [ ":ffx_profile_tool_versioned" ] | |
| } | |
| group("tests") { | |
| testonly = true | |
| deps = [ | |
| ":ffx_profile_tests($host_toolchain)", | |
| # Bazel-migrated plugins whose unit tests are no longer aggregated by | |
| # :ffx_profile_tests. | |
| "cpu/load:tests", | |
| "gpu/usage:tests", | |
| "memory:tests", | |
| "network/activity:tests", | |
| "power/logger:tests", | |
| "temperature/logger:tests", | |
| ] | |
| } | |
| } |