tree: 0acbf27a4108d3a94e667667cfcc5a4f1f458f1f [path history] [tgz]
  1. metrics/
  2. tests/
  3. __init__.py
  4. BUILD.gn
  5. OWNERS
  6. README.md
  7. run_cpu_breakdown.py
  8. trace_importing.py
  9. trace_metrics.py
  10. trace_model.py
  11. trace_time.py
  12. trace_utils.py
src/performance/lib/trace_processing/README.md

Trace Processor Library

This directory contains a Python library which can deserialize and extract metrics from JSON-based traces in the FXT format.

Library modules include:

  1. trace_importing - Code to deserialize the Fuchsia trace JSON into an in-memory data model.
  2. trace_model - The definition of the in-memory trace data model.
  3. trace_time - Nanosecond-resolution time types for use by the trace data model.
  4. trace_utils - Utilities to extract and filter trace events from a data model.

The library is based on the original version of this code located at sdk/testing/sl4f/client/lib/src/trace_processing/ and sdk/testing/sl4f/client/test/

Binary module includes:

  1. run_cpu_breakdown - Standalone processing on a Fuchsia trace JSON that outputs information about CPU metrics.

How to use run_cpu_breakdown:

  1. fx set with the flag: --with-host //src/performance/lib/trace_processing:run_cpu_breakdown
  2. fx build
  3. fx run_cpu_breakdown <path to trace JSON> <path to output>

How to run tests for cpu_breakdown:

  1. fx set with the flag: --with-host //src/performance/lib:tests,//src/performance/lib/trace_processing:run_cpu_breakdown
  2. fx build
  3. fx test --host