Expose metadata in TraceProcessor

This change addresses issue #399 (https://github.com/google/perfetto/issues/399).

Modifications:
- The `TraceProcessor` class in `python/perfetto/trace_processor/api.py` now stores metadata when a trace URI is resolved.
- A new `get_metadata()` method is added to `TraceProcessor` to allow you to access this metadata.
- I added a new test case, `test_trace_processor_metadata`, to `python/test/api_integrationtest.py` to verify this new functionality. It checks that metadata is correctly populated when using a URI resolver and that it behaves as expected (returns None) when a direct file path is used.
2 files changed
tree: 922605c87429b3fecb78f10e1f332b55bc5ab838
  1. .github/
  2. bazel/
  3. build_overrides/
  4. buildtools/
  5. debian/
  6. docs/
  7. examples/
  8. gn/
  9. include/
  10. infra/
  11. protos/
  12. python/
  13. src/
  14. test/
  15. third_party/
  16. tools/
  17. ui/
  18. .bazelignore
  19. .bazelrc
  20. .bazelversion
  21. .clang-format
  22. .clang-tidy
  23. .git-blame-ignore-revs
  24. .gitallowed
  25. .gitattributes
  26. .gitignore
  27. .gn
  28. .style.yapf
  29. .yapfignore
  30. Android.bp
  31. Android.bp.extras
  32. BUILD
  33. BUILD.extras
  34. BUILD.gn
  35. CHANGELOG
  36. codereview.settings
  37. DIR_METADATA
  38. heapprofd.rc
  39. LICENSE
  40. meson.build
  41. METADATA
  42. MODULE.bazel
  43. MODULE.bazel.lock
  44. MODULE_LICENSE_APACHE2
  45. OWNERS
  46. perfetto.rc
  47. perfetto_flags.aconfig
  48. PerfettoIntegrationTests.xml
  49. persistent_cfg.pbtxt
  50. README.chromium
  51. README.md
  52. TEST_MAPPING
  53. traced_perf.rc
  54. WATCHLISTS
  55. WORKSPACE
README.md

Perfetto - System profiling, app tracing and trace analysis

Perfetto is a production-grade open-source stack for performance instrumentation and trace analysis. It offers services and libraries and for recording system-level and app-level traces, native + java heap profiling, a library for analyzing traces using SQL and a web-based UI to visualize and explore multi-GB traces.

See https://perfetto.dev/docs or the /docs/ directory for documentation.