tree: 837ce35e1d44dd312a78fe46cb784ab3a7a0d8be [path history] [tgz]
  1. metrics/
  2. tests/
  3. __init__.py
  4. BUILD.gn
  5. hardware_configs.py
  6. OWNERS
  7. README.md
  8. run_cpu_breakdown.py
  9. run_power_metrics.py
  10. run_suspend_metrics.py
  11. trace_importing.py
  12. trace_metrics.py
  13. trace_model.py
  14. trace_time.py
  15. 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 by_cpu <path to trace JSON> <path to output>

How to use run_cpu_breakdown in aggregate mode:

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

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