From 04b0dc97ef0841d0ef22c0ae8ac9c5ca506b7018 Mon Sep 17 00:00:00 2001 From: Franciszek Gorski Date: Thu, 6 Jun 2019 19:28:30 +0200 Subject: [PATCH] Support for storing more than one samples --- src/lib/stats/observation.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib/stats/observation.cc b/src/lib/stats/observation.cc index badd1f86b5..838ef63712 100644 --- a/src/lib/stats/observation.cc +++ b/src/lib/stats/observation.cc @@ -62,6 +62,7 @@ void Observation::setMaxSampleAge(const StatsDuration& duration) { isc_throw(InvalidStatType, "Unknown statistic type: " << typeToText(type_)); }; + } void Observation::setMaxSampleCount(uint32_t max_samples) { @@ -317,8 +318,7 @@ std::string Observation::typeToText(Type type) { tmp << "integer"; break; case STAT_FLOAT: - tmp << "float"; - break; + tmp << "float"; break; case STAT_DURATION: tmp << "duration"; break; @@ -339,6 +339,10 @@ Observation::getJSON() const { ElementPtr value; ElementPtr timestamp; + /// @todo: Add support for retrieving more than one sample for a given + /// observation + + // Support for retrieving more than one sample // retrieving all samples of indicated observation switch (type_) { -- 2.47.2