Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add aggregator (#841) * add aggregator WIP * add metric types enum * add threading to metrics.py, add unsafe_flush * fix aggregator * add tests * remove print statements * remove lock for flush unsafe function * fix removing wrong lock * remove unecessary If * Run tests on any branch * Change MetricAggregator propreties so that it has all necessary fields to send to client * change aggregator to use MetricAggregator type * fix test * fix lint * remove enums * fix lint x2 * fix lint x3 * use existing threading function * remove import * fix lint * refactor _stop_flush_thread * rename variable * remove client from aggregator * move changes to base.py to next PR --------- Co-authored-by: Brian Floersch <brian.floersch@datadoghq.com> * add flush_function parameter * refactor base.py to use the aggregator * revert test.yml change * WIP * disable buffering when aggregation is enabled * add flush_aggregated_metrics function * check whether or not _start_flush_thread is being called for buffering or aggregation before returning * WIP * finish disabling aggregation functions * move line inside if statement * fix lint * fix lint 2 * fix lint * fix renamed variable * fix unit tests, rename variables * check if thread is None * fix tests * fix tests * rerun tests * add back unicode * revert lint to forking * reverse lint changes * add aggregation to increment * TESTING * revert name back to flush_interval * test * change setter name * fix lint * change order of disable aggregation and buffering * test * change order of disable aggregation and buffering * remove setter design * set default aggregation time interval * fix lint * remove function call * fix lint * do not allow buffering when aggregation is enabled * testing for benchmarks * check if removing logs fixes test * add back logs * remove logs * rerun tests * set default aggregation flush interval to 2 seconds * remove print statement * address comments * use a single flush thread * remove unecessary lint changes, fix refactored code * add back import * fix refactored code * remove lint and comment * check lint error * fix variable naming, deleted test function * add back imports for comment variables * fix lint * test add disable_aggregating to test_fork_hooks * add parameter * revert changes * test * check for tags = None * remove test * fix comment * rename variable * add flush function --------- Co-authored-by: Brian Floersch <brian.floersch@datadoghq.com>
- Loading branch information