LLStat Class Reference

#include <llstat.h>

Collaboration diagram for LLStat:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLStat (const U32 num_bins=32, BOOL use_frame_timer=FALSE)
 ~LLStat ()
void reset ()
void start ()
void addValue (const F32 value=1.f)
void addValue (const S32 value)
void addValue (const U32 value)
void setBeginTime (const F64 time)
void addValueTime (const F64 time, const F32 value=1.f)
S32 getCurBin () const
S32 getNextBin () const
F32 getCurrent () const
F32 getCurrentPerSec () const
F64 getCurrentBeginTime () const
F64 getCurrentTime () const
F32 getCurrentDuration () const
F32 getPrev (S32 age) const
F32 getPrevPerSec (S32 age) const
F64 getPrevBeginTime (S32 age) const
F64 getPrevTime (S32 age) const
F32 getBin (S32 bin) const
F32 getBinPerSec (S32 bin) const
F64 getBinBeginTime (S32 bin) const
F64 getBinTime (S32 bin) const
F32 getMax () const
F32 getMaxPerSec () const
F32 getMean () const
F32 getMeanPerSec () const
F32 getMeanDuration () const
F32 getMin () const
F32 getMinPerSec () const
F32 getMinDuration () const
F32 getSum () const
F32 getSumDuration () const
U32 getNumValues () const
S32 getNumBins () const
F64 getLastTime () const

Private Attributes

BOOL mUseFrameTimer
U32 mNumValues
U32 mNumBins
F32 mLastValue
F64 mLastTime
F32mBins
F64mBeginTime
F64mTime
F32mDT
S32 mCurBin
S32 mNextBin

Static Private Attributes

static LLTimer sTimer
static LLFrameTimer sFrameTimer

Detailed Description

Definition at line 135 of file llstat.h.


Constructor & Destructor Documentation

LLStat::LLStat ( const U32  num_bins = 32,
BOOL  use_frame_timer = FALSE 
)

Definition at line 302 of file llstat.cpp.

References f, i, llassert, mBeginTime, mBins, mCurBin, mDT, mLastTime, mLastValue, mNextBin, mNumBins, mNumValues, mTime, and mUseFrameTimer.

LLStat::~LLStat (  ) 

Definition at line 326 of file llstat.cpp.

References mBeginTime, mBins, mDT, and mTime.


Member Function Documentation

void LLStat::addValue ( const U32  value  )  [inline]

Definition at line 147 of file llstat.h.

References addValue().

void LLStat::addValue ( const S32  value  )  [inline]

Definition at line 146 of file llstat.h.

References addValue().

void LLStat::addValue ( const F32  value = 1.f  ) 

Definition at line 407 of file llstat.cpp.

References LLFrameTimer::getElapsedSeconds(), LLTimer::getElapsedTimeF64(), mBeginTime, mBins, mCurBin, mDT, mLastTime, mLastValue, mNextBin, mNumBins, mNumValues, mTime, mUseFrameTimer, sFrameTimer, and sTimer.

Referenced by addValue(), LLFloaterJoystick::draw(), LLViewerWindow::handlePerFrameHover(), idle_network(), process_sim_stats(), reset_statistics(), LLPipeline::resetFrameStats(), LLFrameStats::stop(), LLViewerObjectList::update(), update_statistics(), LLViewerCamera::updateCameraLocation(), LLViewerImageList::updateImages(), LLWorld::updateNetStats(), and LLViewerRegion::updateNetStats().

void LLStat::addValueTime ( const F64  time,
const F32  value = 1.f 
)

Definition at line 363 of file llstat.cpp.

References mBeginTime, mBins, mCurBin, mDT, mLastTime, mLastValue, mNextBin, mNumBins, mNumValues, and mTime.

F32 LLStat::getBin ( S32  bin  )  const

Definition at line 637 of file llstat.cpp.

References mBins.

F64 LLStat::getBinBeginTime ( S32  bin  )  const

Definition at line 647 of file llstat.cpp.

References mBeginTime.

F32 LLStat::getBinPerSec ( S32  bin  )  const

Definition at line 642 of file llstat.cpp.

References mBins, and mDT.

F64 LLStat::getBinTime ( S32  bin  )  const

Definition at line 652 of file llstat.cpp.

References mTime.

Referenced by LLFrameStatView::draw().

S32 LLStat::getCurBin (  )  const

Definition at line 814 of file llstat.cpp.

References mCurBin.

Referenced by LLFrameStatView::draw().

F32 LLStat::getCurrent (  )  const

Definition at line 657 of file llstat.cpp.

References mBins, and mCurBin.

Referenced by LLFloaterLagMeter::determineServer(), LLStatBar::draw(), LLFloaterAbout::LLFloaterAbout(), LLHUDText::updateAll(), LLViewerStats::updateFrameStats(), and LLAgent::updateLookAt().

F64 LLStat::getCurrentBeginTime (  )  const

Definition at line 667 of file llstat.cpp.

References mBeginTime, and mCurBin.

F32 LLStat::getCurrentDuration (  )  const

Definition at line 677 of file llstat.cpp.

References mCurBin, and mDT.

Referenced by LLFrameStats::addFrameData().

F32 LLStat::getCurrentPerSec (  )  const

Definition at line 662 of file llstat.cpp.

References mBins, mCurBin, and mDT.

Referenced by LLStatBar::draw().

F64 LLStat::getCurrentTime (  )  const

Definition at line 672 of file llstat.cpp.

References mCurBin, and mTime.

F64 LLStat::getLastTime (  )  const

Definition at line 824 of file llstat.cpp.

References mLastTime.

F32 LLStat::getMax (  )  const

Definition at line 448 of file llstat.cpp.

References i, mBins, mLastValue, mNextBin, mNumBins, and mNumValues.

Referenced by LLStatBar::draw().

F32 LLStat::getMaxPerSec (  )  const

Definition at line 734 of file llstat.cpp.

References i, llmax(), mBins, mDT, mNextBin, mNumBins, and mNumValues.

Referenced by LLStatBar::draw().

F32 LLStat::getMean (  )  const

Definition at line 474 of file llstat.cpp.

References i, mBins, mNextBin, mNumBins, and mNumValues.

Referenced by LLFloaterLagMeter::determineNetwork(), LLStatGraph::draw(), LLStatBar::draw(), idle(), and LLViewerThrottle::updateDynamicThrottle().

F32 LLStat::getMeanDuration (  )  const

Definition at line 709 of file llstat.cpp.

References count, i, mDT, mNextBin, mNumBins, and mNumValues.

Referenced by LLFloaterLagMeter::determineClient().

F32 LLStat::getMeanPerSec (  )  const

Definition at line 682 of file llstat.cpp.

References f, i, mBins, mDT, mNextBin, mNumBins, and mNumValues.

Referenced by LLStatGraph::draw(), LLStatBar::draw(), and LLViewerWindow::handlePaint().

F32 LLStat::getMin (  )  const

Definition at line 502 of file llstat.cpp.

References i, mBins, mLastValue, mNextBin, mNumBins, and mNumValues.

Referenced by LLStatBar::draw().

F32 LLStat::getMinDuration (  )  const

Definition at line 794 of file llstat.cpp.

References i, llmin(), mDT, mNumBins, and mNumValues.

F32 LLStat::getMinPerSec (  )  const

Definition at line 764 of file llstat.cpp.

References i, llmin(), mBins, mDT, mNextBin, mNumBins, and mNumValues.

Referenced by LLStatBar::draw().

S32 LLStat::getNextBin (  )  const

Definition at line 819 of file llstat.cpp.

References mNextBin.

Referenced by LLStatBar::draw().

S32 LLStat::getNumBins (  )  const

Definition at line 809 of file llstat.cpp.

References mNumBins.

Referenced by LLFrameStatView::draw().

U32 LLStat::getNumValues (  )  const

Definition at line 804 of file llstat.cpp.

References mNumValues.

Referenced by LLStatBar::draw(), and LLFrameStatView::draw().

F32 LLStat::getPrev ( S32  age  )  const

Definition at line 563 of file llstat.cpp.

References mBins, mCurBin, mNextBin, mNumBins, and S32.

Referenced by LLStatBar::draw(), LLViewerWindow::handlePaint(), and LLHoverView::updateHover().

F64 LLStat::getPrevBeginTime ( S32  age  )  const

Definition at line 599 of file llstat.cpp.

References mBeginTime, mCurBin, mNextBin, mNumBins, and S32.

Referenced by LLFrameStatView::draw().

F32 LLStat::getPrevPerSec ( S32  age  )  const

Definition at line 581 of file llstat.cpp.

References mBins, mCurBin, mDT, mNextBin, mNumBins, and S32.

Referenced by LLStatBar::draw().

F64 LLStat::getPrevTime ( S32  age  )  const

Definition at line 618 of file llstat.cpp.

References mCurBin, mNextBin, mNumBins, mTime, and S32.

Referenced by LLFrameStatView::draw().

F32 LLStat::getSum (  )  const

Definition at line 529 of file llstat.cpp.

References i, mBins, mNextBin, mNumBins, and mNumValues.

F32 LLStat::getSumDuration (  )  const

Definition at line 546 of file llstat.cpp.

References i, mDT, mNextBin, mNumBins, and mNumValues.

void LLStat::reset (  ) 

Definition at line 334 of file llstat.cpp.

References f, i, mBeginTime, mBins, mCurBin, mDT, mLastValue, mNumBins, mNumValues, and mTime.

Referenced by LLPipeline::init(), and LLViewerStats::resetStats().

void LLStat::setBeginTime ( const F64  time  ) 

Definition at line 358 of file llstat.cpp.

References mBeginTime, and mNextBin.

void LLStat::start (  ) 

Definition at line 395 of file llstat.cpp.

References LLFrameTimer::getElapsedSeconds(), LLTimer::getElapsedTimeF64(), mBeginTime, mNextBin, mUseFrameTimer, sFrameTimer, and sTimer.

Referenced by send_agent_resume(), and LLFrameStats::start().


Member Data Documentation

F64* LLStat::mBeginTime [private]

Definition at line 196 of file llstat.h.

Referenced by addValue(), addValueTime(), getBinBeginTime(), getCurrentBeginTime(), getPrevBeginTime(), LLStat(), reset(), setBeginTime(), start(), and ~LLStat().

F32* LLStat::mBins [private]

Definition at line 195 of file llstat.h.

Referenced by addValue(), addValueTime(), getBin(), getBinPerSec(), getCurrent(), getCurrentPerSec(), getMax(), getMaxPerSec(), getMean(), getMeanPerSec(), getMin(), getMinPerSec(), getPrev(), getPrevPerSec(), getSum(), LLStat(), reset(), and ~LLStat().

S32 LLStat::mCurBin [private]

Definition at line 199 of file llstat.h.

Referenced by addValue(), addValueTime(), getCurBin(), getCurrent(), getCurrentBeginTime(), getCurrentDuration(), getCurrentPerSec(), getCurrentTime(), getPrev(), getPrevBeginTime(), getPrevPerSec(), getPrevTime(), LLStat(), and reset().

F32* LLStat::mDT [private]

Definition at line 198 of file llstat.h.

Referenced by addValue(), addValueTime(), getBinPerSec(), getCurrentDuration(), getCurrentPerSec(), getMaxPerSec(), getMeanDuration(), getMeanPerSec(), getMinDuration(), getMinPerSec(), getPrevPerSec(), getSumDuration(), LLStat(), reset(), and ~LLStat().

F64 LLStat::mLastTime [private]

Definition at line 194 of file llstat.h.

Referenced by addValue(), addValueTime(), getLastTime(), and LLStat().

F32 LLStat::mLastValue [private]

Definition at line 193 of file llstat.h.

Referenced by addValue(), addValueTime(), getMax(), getMin(), LLStat(), and reset().

S32 LLStat::mNextBin [private]

Definition at line 200 of file llstat.h.

Referenced by addValue(), addValueTime(), getMax(), getMaxPerSec(), getMean(), getMeanDuration(), getMeanPerSec(), getMin(), getMinPerSec(), getNextBin(), getPrev(), getPrevBeginTime(), getPrevPerSec(), getPrevTime(), getSum(), getSumDuration(), LLStat(), setBeginTime(), and start().

U32 LLStat::mNumBins [private]

Definition at line 192 of file llstat.h.

Referenced by addValue(), addValueTime(), getMax(), getMaxPerSec(), getMean(), getMeanDuration(), getMeanPerSec(), getMin(), getMinDuration(), getMinPerSec(), getNumBins(), getPrev(), getPrevBeginTime(), getPrevPerSec(), getPrevTime(), getSum(), getSumDuration(), LLStat(), and reset().

U32 LLStat::mNumValues [private]

Definition at line 191 of file llstat.h.

Referenced by addValue(), addValueTime(), getMax(), getMaxPerSec(), getMean(), getMeanDuration(), getMeanPerSec(), getMin(), getMinDuration(), getMinPerSec(), getNumValues(), getSum(), getSumDuration(), LLStat(), and reset().

F64* LLStat::mTime [private]

Definition at line 197 of file llstat.h.

Referenced by addValue(), addValueTime(), getBinTime(), getCurrentTime(), getPrevTime(), LLStat(), reset(), and ~LLStat().

BOOL LLStat::mUseFrameTimer [private]

Definition at line 190 of file llstat.h.

Referenced by addValue(), LLStat(), and start().

LLFrameTimer LLStat::sFrameTimer [static, private]

Definition at line 202 of file llstat.h.

Referenced by addValue(), and start().

LLTimer LLStat::sTimer [static, private]

Definition at line 201 of file llstat.h.

Referenced by addValue(), and start().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:48 2010 for Second Life Viewer by  doxygen 1.4.7