tree: 72bcb2f50d4f08db75ec8030a2f72ac9a518ff1a [search]
  1. bench/
  2. src/
  3. BUILD.bazel
  4. BUILD.gn
  5. METADATA.textproto
  6. OWNERS
  7. README.md
src/lib/diagnostics/hierarchy/rust/README.md

diagnostics_hierarchy

diagnostics_hierarchy is a library that contains the Diagnostics Hierarchy that contains Inspect, Logs or Lifecycle data.

Building

This project should be automatically included in builds.

Using

diagnostics_hierarchy can be used by depending on the //src/lib/diagnostics/hierarchy/rust GN target and then using the diagnostics_hierarchy crate in a Rust project.

diagnostics_hierarchy is not available in the SDK.

Testing

Unit tests for diagnostics_hierarchy are available in the diagnostics_hierarchy_tests package:

$ fx test diagnostics_hierarchy_tests

You'll need to include //src/lib/diagnostics/hierarchy/rust:tests in your build, either by using fx args to put it under universe_package_labels, or by fx set [....] --with //src/lib/diagnostics/hierarchy/rust:tests.

Benchmarking

Benchmarks for diagnostics_hierarchy are available in the diagnostics-hierarchy-benchmarks package.

One way to run the benchmarks is with the following command:

$ fx test --e2e --outdir="out/test_out" --timestamp-artifacts diagnostics-hierarchy-rust-benchmark

It is possible to run the benchmarks in a fast “unit test mode” with the following test command. This runs a small number of test iterations without collecting performance results, which can be useful for checking that the tests don't fail:

$ fx test fuchsia-pkg://fuchsia.com/diagnostics-hierarchy-benchmarks#meta/hierarchy.cm

You'll need to include //src/lib/diagnostics/hierarchy/rust:benchmarks in your build, either by using fx args to put it under universe_package_labels, or by fx set [....] --with //src/lib/diagnostics/hierarchy/rust:benchmarks.