The measurement and metrics API contains three different concepts:
Configuration
Use the configuration CRUD to control the measurement logic.
It allows to specify the parameters for a measurement:
- Sample size: The number of samples to take for each measurement.
- Sample strategy: The strategy to use to take the samples. Currently either
randomornewest. Therandomstrategy will take random samples from the data, while theneweststrategy will take the newest samples. - Frequency: The frequency of the running a new measurement operation. Currently either
manual,daily,weeklyormonthly. Themanualfrequency will require the user to manually start the measurement operation. Thedailyfrequency will run the measurement operation once a day. Theweeklyfrequency will run the measurement operation once a week. Themonthlyfrequency will run the measurement operation once a month.
Measurement Operations
An operation tracks the state of a measurement. It contains the following fields:
- IDs
- Timestamp
- State
- Type
The API allows CRUD actions on these operations.
To start a new measurement, we have to create a new operation with the defined type. Currently only app_measurements is supported. Check out project measurements for more information.
Measurement Results (Metrics)
After the operation is finished, the results will be stored in a database. The results will be automatically visualized in the UI statistics page.
The API ( Get measurements for the given app_id ) allows to retrieve the results of a measurement operation.
