#include <Meter.h>

Collaboration diagram for Mem::Meter:

Public Member Functions

 Meter ()
 
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
 current level (count or volume) More...
 
ssize_t hwater_level
 high water mark More...
 
time_t hwater_stamp
 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.

Constructor & Destructor Documentation

Mem::Meter::Meter ( )
inline

Definition at line 23 of file Meter.h.

Member Function Documentation

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 41 of file Meter.h.

References hwater_level, hwater_stamp, level, NULL, and squid_curtime.

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

void Mem::Meter::flush ( )
inline

Definition at line 26 of file Meter.h.

References level.

Referenced by MemPoolMeter::flush().

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

Definition at line 32 of file Meter.h.

References checkHighWater(), and level.

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

Definition at line 35 of file Meter.h.

References checkHighWater(), and level.

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

Definition at line 33 of file Meter.h.

References level.

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

Definition at line 36 of file Meter.h.

References level.

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

Definition at line 29 of file Meter.h.

References hwater_level.

Referenced by Mem::PoolReport().

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

Definition at line 30 of file Meter.h.

References hwater_stamp.

Referenced by MemPoolReportSorter(), and Mem::PoolReport().

Member Data Documentation

ssize_t Mem::Meter::hwater_level
private

Definition at line 49 of file Meter.h.

Referenced by checkHighWater(), and peak().

time_t Mem::Meter::hwater_stamp
private

Definition at line 50 of file Meter.h.

Referenced by checkHighWater(), and peakTime().

ssize_t Mem::Meter::level
private

Definition at line 48 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