From: Franciszek Gorski Date: Thu, 6 Jun 2019 17:28:30 +0000 (+0200) Subject: Support for storing more than one samples X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66f1dd703b5ed9224249f5f609db5ca2fb3372e0;p=thirdparty%2Fkea.git Support for storing more than one samples --- 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_) {