|
SWC-DB
v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
|
Go to the documentation of this file.
6 #ifndef swcdb_Common_Stats_Stat_h
7 #define swcdb_Common_Stats_Stat_h
13 namespace SWC {
namespace Common {
namespace Stats {
17 template<
typename ValueT>
28 void add(ValueT v) noexcept {
29 if(std::numeric_limits<ValueT>::max() -
total > v) {
40 ValueT
avg() const noexcept {
61 template<
typename ValueT>
72 void add(ValueT v) noexcept {
90 ValueT
avg() const noexcept {
96 ValueT
max() const noexcept {
102 ValueT
min() const noexcept {
119 void print(std::ostream& out)
const {
127 out <<
"(min=" <<
min <<
" max=" <<
max <<
" avg=" <<
avg <<
')';
140 #endif // swcdb_Common_Stats_Stat_h
Core::MutexAtomic m_mutex
SWC_CAN_INLINE void gather(MinMaxAvgCount< ValueT > &to) noexcept
SWC_CAN_INLINE ValueT avg() const noexcept
void print(std::ostream &out) const
SWC_CAN_INLINE ValueT avg() const noexcept
SWC_CAN_INLINE ValueT total() const noexcept
The SWC-DB C++ namespace 'SWC'.
virtual SWC_CAN_INLINE ~MinMaxAvgCount_Safe() noexcept
SWC_CAN_INLINE MinMaxAvgCount() noexcept
SWC_CAN_INLINE ValueT max() const noexcept
SWC_CAN_INLINE void gather(MinMaxAvgCount< ValueT > &to) noexcept
SWC_CAN_INLINE void add(ValueT v) noexcept
SWC_CAN_INLINE MinMaxAvgCount_Safe() noexcept
MinMaxAvgCount_Safe< uint64_t > Stat
MinMaxAvgCount< ValueT > m_value
SWC_CAN_INLINE ValueT min() const noexcept
SWC_CAN_INLINE void reset() noexcept
SWC_CAN_INLINE ValueT count() const noexcept
SWC_CAN_INLINE void reset() noexcept
SWC_CAN_INLINE void add(ValueT v) noexcept