#include <Meter.h>

Collaboration diagram for Mem::Meter:

Public Member Functions

void flush ()
 flush the meter level back to 0, but leave peak records More...
 
ssize_t currentLevel () const
 
ssize_t peak () const
 
time_t peakTime () const
 
Meteroperator++ ()
 
Meteroperator-- ()
 
Meteroperator+= (ssize_t n)
 
Meteroperator-= (ssize_t n)
 

Private Member Functions

void checkHighWater ()
 

Private Attributes

ssize_t level = 0
 current level (count or volume) More...
 
ssize_t hwater_level = 0
 high water mark More...
 
time_t hwater_stamp = 0
 timestamp of last high water mark change More...
 

Detailed Description

object to track per-action memory usage (e.g. #idle objects)

Definition at line 20 of file Meter.h.

Member Function Documentation

◆ checkHighWater()

void Mem::Meter::checkHighWater ( )
inlineprivate

check the high-water level of this meter and raise if necessary recording the timestamp of last high-water peak change

Definition at line 39 of file Meter.h.

References hwater_level, hwater_stamp, level, and squid_curtime.

Referenced by operator++(), and operator+=().

◆ currentLevel()

◆ flush()

void Mem::Meter::flush ( )
inline

Definition at line 24 of file Meter.h.

References level.

Referenced by Mem::PoolMeter::flush().

◆ operator++()

Meter & Mem::Meter::operator++ ( )
inline

Definition at line 30 of file Meter.h.

References checkHighWater(), and level.

◆ operator+=()

Meter & Mem::Meter::operator+= ( ssize_t  n)
inline

Definition at line 33 of file Meter.h.

References checkHighWater(), and level.

◆ operator--()

Meter & Mem::Meter::operator-- ( )
inline

Definition at line 31 of file Meter.h.

References level.

◆ operator-=()

Meter & Mem::Meter::operator-= ( ssize_t  n)
inline

Definition at line 34 of file Meter.h.

References level.

◆ peak()

ssize_t Mem::Meter::peak ( ) const
inline

Definition at line 27 of file Meter.h.

References hwater_level.

Referenced by Mem::PoolReport().

◆ peakTime()

time_t Mem::Meter::peakTime ( ) const
inline

Definition at line 28 of file Meter.h.

References hwater_stamp.

Referenced by Mem::PoolReport().

Member Data Documentation

◆ hwater_level

ssize_t Mem::Meter::hwater_level = 0
private

Definition at line 47 of file Meter.h.

Referenced by checkHighWater(), and peak().

◆ hwater_stamp

time_t Mem::Meter::hwater_stamp = 0
private

Definition at line 48 of file Meter.h.

Referenced by checkHighWater(), and peakTime().

◆ level

ssize_t Mem::Meter::level = 0
private

Definition at line 46 of file Meter.h.

Referenced by checkHighWater(), currentLevel(), flush(), operator++(), operator+=(), operator--(), and operator-=().


The documentation for this class was generated from the following file:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors