class WindowedUintProperty
Defined at line 49 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/inspect/windowed_uint_property.h
WindowedUintProperty class helps simplify the implementation of inspect counters that reflect
the count of events over just the past N units of time.
Such counters come in handy for 'Detect' usecases where snapshots need to be triggered based on
thresholds.
Init()
Lets user initialize an inspect counter that tracks event count over a specificed window of
time. The 'window of time' is equal to window_size multiplied by the interval at which the user
decides to move the window.
Add()
Incrementes the inspect counter.
SlideWindow()
Moves the window by one slot.
Example Usage:
a) User needs an inspect counter that tracks events across a 1hr period, refreshed ever minute
=> window_size = 60 and user needs to invoke SlideWindow() ever minute.
b) User needs a counter that tracks events across a 1day period, refreshed 30 minutes =>
window_size = 48 and and user needs to invoke SlideWindow() needs to be invoked every 30
minutes.
Public Methods
zx_status_t Init (inspect::Node * p, uint32_t window_size, const std::string & name, uint64_t value)
Defined at line 24 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/inspect/windowed_uint_property.cc
void Add (uint64_t value)
We do not support Set() and Subtract() to avoid the possibility of the counter becoming
negative for a window of time.
Defined at line 42 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/inspect/windowed_uint_property.cc
void SlideWindow ()
Defined at line 48 of file ../../src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/inspect/windowed_uint_property.cc