blob: 868e8199c97024ab161b8f03035d076462c08cea [file] [log] [blame]
# Copyright 2025 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/rust/rustc_library.gni")
import("//tools/protobuf/rust_proto_library.gni")
assert(is_host, "port_picker is for use with the host toolchain only")
rustc_library("profiler") {
name = "ffx_profiler"
version = "0.1.0"
edition = "2024"
with_unit_tests = true
deps = [
":profile_rust_proto",
"//src/developer/ffx/config:lib",
"//src/developer/ffx/lib/symbolize",
"//src/lib/diagnostics/log/rust_cpp_bridge",
"//src/performance/lib/fxt/rust",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:hex",
"//third_party/rust_crates:prost",
"//third_party/rust_crates:rayon",
"//third_party/rust_crates:thiserror",
]
test_deps = [
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:tempfile",
]
sources = [
"src/fxt_parse.rs",
"src/lib.rs",
"src/parse.rs",
"src/pprof.rs",
"src/symbolize.rs",
]
}
rust_proto_library("profile_rust_proto") {
sources = [ "//third_party/perfetto/protos/third_party/pprof/profile.proto" ]
packages = [ "perfetto.third_party.perftools.profiles" ]
}
group("tests") {
testonly = true
deps = [
":profiler_test",
"//third_party/rust_crates:assert_matches",
]
}
if (is_host) {
group("host_tests") {
testonly = true
deps = [ "tests:host_tests" ]
}
}