MySQL 26.7.0
Source Code Documentation
mysql::csa::Sliding_window_counter Struct Reference

Calculates statistic value in a time window. More...

#include <sliding_window_counter.h>

Public Member Functions

void update (unsigned long long current)
 Updates the window counter. More...
 
unsigned long long get () const
 Obtains the value in the current time window. More...
 

Public Attributes

unsigned long long m_previous {0}
 Previous global counter. More...
 
unsigned long long m_value {0}
 Counter in the current window. More...
 

Detailed Description

Calculates statistic value in a time window.

Member Function Documentation

◆ get()

unsigned long long mysql::csa::Sliding_window_counter::get ( ) const

Obtains the value in the current time window.

◆ update()

void mysql::csa::Sliding_window_counter::update ( unsigned long long  current)

Updates the window counter.

Parameters
currentGlobal value, registered at current point of time

Member Data Documentation

◆ m_previous

unsigned long long mysql::csa::Sliding_window_counter::m_previous {0}

Previous global counter.

◆ m_value

unsigned long long mysql::csa::Sliding_window_counter::m_value {0}

Counter in the current window.


The documentation for this struct was generated from the following files: