tree: 97830fe1e3731cce5463b85bc5fca1cea5a58edb [path history] [tgz]
  1. doc/
  2. attribution_impl_helpers.h
  3. context_collection.cc
  4. context_collection.h
  5. cpu_measurement_data.cc
  6. cpu_measurement_data.h
  7. cpu_measurement_delegate.cc
  8. cpu_measurement_monitor.cc
  9. cpu_measurement_monitor.h
  10. cpu_measurement_monitor_unittest.cc
  11. cpu_proportion_tracker.cc
  12. DEPS
  13. frame_context.cc
  14. frame_context_unittest.cc
  15. graph_change.cc
  16. graph_change.h
  17. memory_measurement_delegate.cc
  18. memory_measurement_provider.cc
  19. memory_measurement_provider.h
  20. memory_measurement_provider_browsertest.cc
  21. node_data_describers.cc
  22. node_data_describers.h
  23. origin_in_browsing_instance_context.cc
  24. origin_in_browsing_instance_context_unittest.cc
  25. page_context.cc
  26. page_context_unittest.cc
  27. performance_manager_aliases.h
  28. process_context.cc
  29. process_context_unittest.cc
  30. queries.cc
  31. queries_unittest.cc
  32. query_params.cc
  33. query_params.h
  34. query_scheduler.cc
  35. query_scheduler.h
  36. query_scheduler_unittest.cc
  37. README.md
  38. resource_contexts_unittest.cc
  39. type_helpers_unittest.cc
  40. worker_client_pages.cc
  41. worker_client_pages.h
  42. worker_context.cc
  43. worker_context_unittest.cc
components/performance_manager/resource_attribution/README.md

Resource Attribution Overview

Overview

The Resource Attribution component, part of Performance Manager, centralizes data about the resources the browser uses and provides a unified interface to query them. It will manage scheduling of resource measurements so that multiple callers requesting information about the same resources don’t schedule redundant measurements.

API

The public interface is documented at bit.ly/resource-attribution-api.

  • Public headers are in components/performance_manager/public/resource_attribution/.
  • Public symbols are in the resource_attribution namespace.
  • Private symbols that must be referenced from components/performance_manager/public/ (eg. in templates) are in the resource_attribution::internal namespace.

Implementation

Here’s an overview picture of the architecture:

Overview Image

The important classes, from the bottom up, are:

  • Measurement Delegates (MemoryMeasurementDelegate, CPUMeasurementDelegate, etc):

    Interface directly with OS or common Chrome functions to perform measurements. Can be replaced by test stubs to simulate measurements. Measurement Providers create delegates through factory classes as needed.

  • Measurement Providers (MemoryMeasurementProvider, CPUMeasurementMonitor, etc):

    Own and control the Measurement Delegates. Convert measurements they return to a common format, aggregate and store them.

  • QueryScheduler:

    Central rendezvous point for queries from the public API. Owns and controls the Measurement Providers and schedules measurements from them based on incoming queries. Filters and combines results from the providers into responses containing the data each query expects.

  • Public API classes (ResourceContext, QueryBuilder, QueryResult, etc):

    Described at bit.ly/resource-attribution-api.