Skip to content

Configuration

Shagiakhmetov Timur edited this page Mar 4, 2019 · 1 revision

Config parameters definition

All configuration options place in the src/config/services.yaml file. You can redefine the file to set an environment variable AGGREGATOR_CONFIG_PATH. The file contains main parameters and services.

Parameters:

  • aggregator.default_app - the default app name using in aggregator by default, by default - Default
  • aggregator.use_jobs_in_aggregation - use db queue for aggregation, by default - false
  • aggregator.fields - a field map to aggregate from profiler, KEY - the name in profiler, VALUE - the name in aggregator, by default - [wt,ct,cpu,mu: mem]
  • aggregator.calls_count_field - the field responses for calls count in this context, uses for some stats, by default - ct
  • aggregator.field_variations - a list of functions to calculate stats, by default - [percent,min,max]
  • aggregator.use_layout - use can switch off html layout to use custom one, by default - true
  • aggregator.fields_descriptions - field descriptions using in the web interface
  • aggregator.log_file - use a custom log file, by default live.profiler.ui.log in working directory
  • source_storage.url - a connecting string for for profiler data storage, in the example config, you can see connecting strings for sqlite, mysqli, pdo_mysql, pdo_pgsql drivers
  • aggregator_storage.url - a connecting string for for aggregator data storage, in the example config, you can see connecting strings for sqlite, mysqli, pdo_mysql, pdo_pgsql drivers

Services: You can use your own class for each service, just inherit the class or implement needed interface.

  • logger - a service for logging implemented psr-3
  • packer - a service to pack/unpack array into string implemented \Badoo\LiveProfilerUI\Interfaces\DataPackerInterface
  • view - a service to fetch a template class implemented \Badoo\LiveProfilerUI\Interfaces\ViewInterface
  • fields - a service to provide access to fields and a stats function list
  • field_handler - a service to handle an aggregating function like sum, min, max implemented \Badoo\LiveProfilerUI\Interfaces\FieldHandlerInterface
  • profiler - a wrapper for profiler to start and end profiling
  • aggregator - a service to aggregate profile records

Pages services:

  • %PAGE_NAME%_page - classes to render pages, can be called themselves or inside other framework

Data provider services:

  • snapshot - a service to access snapshots data implemented \Badoo\LiveProfilerUI\DataProviders\Interfaces\SnapshotInterface
  • method - a service to access methods data implemented \Badoo\LiveProfilerUI\DataProviders\Interfaces\MethodInterface
  • method_data - a service to access method data implemented \Badoo\LiveProfilerUI\DataProviders\Interfaces\MethodDataInterface
  • method_tree - a service to access method tree implemented \Badoo\LiveProfilerUI\DataProviders\Interfaces\MethodTreeInterface
  • source - a service to access profiles data implemented \Badoo\LiveProfilerUI\DataProviders\Interfaces\SourceInterface
  • job - a service to access jobs data implemented \Badoo\LiveProfilerUI\DataProviders\Interfaces\JobInterface

Storage services:

  • source_storage - a service for profiler data storage implemented \Badoo\LiveProfilerUI\Interfaces\StorageInterface
  • aggregator_storage - a service for aggregator storage implemented \Badoo\LiveProfilerUI\Interfaces\StorageInterface

Environment variables

AGGREGATOR_CONFIG_PATH: to change the project's config path (default src/config/services.yaml)

Clone this wiki locally