Agregate query stats by Min and Sum (#5427)

Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5427

Updating query performance monitoring.

Reviewed By: akindyakov

Differential Revision: D14025530

fbshipit-source-id: a50ba0244e0baf83134209258549f86f0717b976
This commit is contained in:
George Guliashvili 2019-02-14 06:18:16 -08:00 committed by Facebook Github Bot
parent 51b104823c
commit 0da8b0227b

View File

@ -35,9 +35,12 @@ void record(const std::vector<std::string>& names,
const std::string& metricName,
monitoring::ValueType measurement) {
for (const std::string& name : names) {
monitoring::record(name + "." + metricName,
measurement,
monitoring::PreAggregationType::None);
const std::string entity = name + "." + metricName;
monitoring::record(
entity, measurement, monitoring::PreAggregationType::Min, true);
monitoring::record(
entity, measurement, monitoring::PreAggregationType::Sum, true);
}
}