storage.front().second - storage.back().second;
// removing samples until the range_of_storage
// stops exceeding the duration limit
- while (range_of_storage > max_sample_age.second) {
+ while (range_of_storage >= max_sample_age.second) {
storage.pop_back();
range_of_storage =
storage.front().second - storage.back().second;
tmp << "integer";
break;
case STAT_FLOAT:
- tmp << "float";
- break;
+ tmp << "float"; break;
case STAT_DURATION:
tmp << "duration";
break;
/// @brief Returns samples (internal version)
///
/// @tparam SampleType type of samples (e.g. IntegerSample)
- /// @tparam Storage type of storage (e.g. list<IntegerSample>)
+ /// @tparam StorageType type of storage (e.g. list<IntegerSample>)
/// @param observation storage
/// @param exp_type expected observation type (used for sanity checking)
/// @throw InvalidStatType if observation type mismatches
void setMaxSampleCountInternal(StorageType& storage,
uint32_t max_samples, Type exp_type);
+
/// @brief Observation (statistic) name
std::string name_;