#include <llframestats.h>
Public Types | |
enum | EStat { IDLE_NETWORK, AGENT_MISC, OBJECT_UPDATE, CLEAN_DEAD, UPDATE_EFFECTS, IMAGE_UPDATE, UPDATE_MOVE, UPDATE_PARTICLES, UPDATE_CULL, UPDATE_GEOM, AUDIO, UPDATE_TEX_STATS, STATE_SORT, REBUILD, RENDER_SYNC, RENDER_GEOM, RENDER_UI, MISC_END, NUM_STATS } |
Public Member Functions | |
LLFrameStats () | |
virtual | ~LLFrameStats () |
void | setFilename (const std::string &filename) |
void | setSummaryFilename (const std::string &filename) |
void | setTrackStats (const BOOL track_stats) |
void | start (const EStat stat_name) |
void | addFrameData () |
void | dump () |
const char * | getCurStatName () const |
LLStat & | getStat (const S32 i) |
const char * | getStatLabel (const S32 i) const |
LLColor4 | getStatColor (const S32 i) const |
Static Public Member Functions | |
static void | startLogging (void *) |
static void | stopLogging (void *) |
static void | timedLogging60 (void *) |
static void | timedLogging30 (void *) |
static void | timedLogging10 (void *) |
Private Member Functions | |
void | stop () |
Private Attributes | |
LLString | mFilename |
LLString | mSummaryFilename |
BOOL | mTrackStats |
LLTimer | mTimer |
BOOL | mUseTimer |
F32 | mStopTime |
EStat | mCurrentStat |
LLStat | mStats [NUM_STATS] |
LLDynamicArray< FrameData > | mFrameData |
Static Private Attributes | |
static char * | sStatLabels [NUM_STATS] |
static LLColor4 | sStatColors [NUM_STATS] |
Classes | |
class | FrameData |
Definition at line 42 of file llframestats.h.
enum LLFrameStats::EStat |
Definition at line 46 of file llframestats.h.
LLFrameStats::LLFrameStats | ( | ) |
Definition at line 86 of file llframestats.cpp.
References FALSE, mCurrentStat, mFilename, mStopTime, mTrackStats, mUseTimer, and NUM_STATS.
LLFrameStats::~LLFrameStats | ( | ) | [virtual] |
void LLFrameStats::setFilename | ( | const std::string & | filename | ) | [inline] |
Definition at line 72 of file llframestats.h.
References mFilename.
Referenced by idle_startup().
void LLFrameStats::setSummaryFilename | ( | const std::string & | filename | ) | [inline] |
Definition at line 73 of file llframestats.h.
References mSummaryFilename.
Referenced by idle_startup().
void LLFrameStats::setTrackStats | ( | const BOOL | track_stats | ) |
Definition at line 252 of file llframestats.cpp.
References dump(), llendl, llinfos, mFrameData, and mTrackStats.
Referenced by addFrameData(), settings_to_globals(), startLogging(), stopLogging(), timedLogging10(), timedLogging30(), and timedLogging60().
void LLFrameStats::start | ( | const EStat | stat_name | ) |
Definition at line 101 of file llframestats.cpp.
References mCurrentStat, mStats, LLStat::start(), and stop().
Referenced by display(), LLAppViewer::idle(), and LLPipeline::renderGeom().
void LLFrameStats::addFrameData | ( | ) |
Definition at line 120 of file llframestats.cpp.
References FALSE, LLStat::getCurrentDuration(), LLTimer::getElapsedTimeF32(), LLViewerObjectList::getNumObjects(), gFullObjectUpdates, gObjectList, gPipeline, gTerseObjectUpdates, i, llendl, llinfos, mCurrentStat, LLFrameStats::FrameData::mDuration, mFrameData, LLFrameStats::FrameData::mNumFullUpdates, LLFrameStats::FrameData::mNumObjects, LLFrameStats::FrameData::mNumTerseUpdates, LLFrameStats::FrameData::mNumTriangles, mStats, mStopTime, mTimer, LLFrameStats::FrameData::mTotalDuration, mTrackStats, LLPipeline::mTrianglesDrawn, mUseTimer, NUM_STATS, S32, and setTrackStats().
Referenced by LLAppViewer::idle().
void LLFrameStats::dump | ( | ) |
Definition at line 162 of file llframestats.cpp.
References LLFile::fopen(), gDirUtilp, LLDir::getExpandedFilename(), i, j, LL_MAX_PATH, LL_PATH_LOGS, llendl, llinfos, mFrameData, mSummaryFilename, NUM_STATS, S32, and sStatLabels.
Referenced by LLAppViewer::disconnectViewer(), and setTrackStats().
const char * LLFrameStats::getCurStatName | ( | ) | const |
Definition at line 309 of file llframestats.cpp.
References getStatLabel(), and mCurrentStat.
Definition at line 85 of file llframestats.h.
References mStats.
Referenced by LLFrameStatView::setup().
const char* LLFrameStats::getStatLabel | ( | const S32 | i | ) | const [inline] |
Definition at line 86 of file llframestats.h.
References sStatLabels.
Referenced by getCurStatName(), and LLFrameStatView::setup().
Definition at line 87 of file llframestats.h.
References sStatColors.
Referenced by LLFrameStatView::setup().
void LLFrameStats::startLogging | ( | void * | ) | [static] |
Definition at line 275 of file llframestats.cpp.
References setTrackStats(), and TRUE.
Referenced by init_client_menu(), and LLAgentPilot::updateTarget().
void LLFrameStats::stopLogging | ( | void * | ) | [static] |
Definition at line 280 of file llframestats.cpp.
References FALSE, and setTrackStats().
Referenced by init_client_menu(), and LLAgentPilot::updateTarget().
void LLFrameStats::timedLogging60 | ( | void * | ) | [static] |
Definition at line 285 of file llframestats.cpp.
References mStopTime, mTimer, mUseTimer, LLTimer::reset(), setTrackStats(), and TRUE.
Referenced by init_client_menu().
void LLFrameStats::timedLogging30 | ( | void * | ) | [static] |
Definition at line 293 of file llframestats.cpp.
References mStopTime, mTimer, mUseTimer, LLTimer::reset(), setTrackStats(), and TRUE.
Referenced by init_client_menu().
void LLFrameStats::timedLogging10 | ( | void * | ) | [static] |
Definition at line 301 of file llframestats.cpp.
References mStopTime, mTimer, mUseTimer, LLTimer::reset(), setTrackStats(), and TRUE.
Referenced by init_client_menu().
void LLFrameStats::stop | ( | ) | [private] |
Definition at line 108 of file llframestats.cpp.
References LLStat::addValue(), mCurrentStat, mStats, and NUM_STATS.
Referenced by start().
LLString LLFrameStats::mFilename [private] |
LLString LLFrameStats::mSummaryFilename [private] |
BOOL LLFrameStats::mTrackStats [private] |
Definition at line 113 of file llframestats.h.
Referenced by addFrameData(), LLFrameStats(), and setTrackStats().
LLTimer LLFrameStats::mTimer [private] |
Definition at line 114 of file llframestats.h.
Referenced by addFrameData(), timedLogging10(), timedLogging30(), and timedLogging60().
BOOL LLFrameStats::mUseTimer [private] |
Definition at line 115 of file llframestats.h.
Referenced by addFrameData(), LLFrameStats(), timedLogging10(), timedLogging30(), and timedLogging60().
F32 LLFrameStats::mStopTime [private] |
Definition at line 116 of file llframestats.h.
Referenced by addFrameData(), LLFrameStats(), timedLogging10(), timedLogging30(), and timedLogging60().
EStat LLFrameStats::mCurrentStat [private] |
Definition at line 118 of file llframestats.h.
Referenced by addFrameData(), getCurStatName(), LLFrameStats(), start(), and stop().
LLStat LLFrameStats::mStats[NUM_STATS] [private] |
Definition at line 120 of file llframestats.h.
Referenced by addFrameData(), getStat(), start(), and stop().
char * LLFrameStats::sStatLabels [static, private] |
Initial value:
{ "IdleNetwork", "AgentMisc", "ObjectUpdate", "CleanDead", "UpdateEffects", "ImageUpdate", "UpdateMove", "UpdateParticles", "UpdateCull", "UpdateGeom", "Audio", "UpdateTexStats", "StateSort", "Rebuild", "RenderSync", "RenderGeom", "RenderUI", "MiscEnd" }
Definition at line 121 of file llframestats.h.
Referenced by dump(), and getStatLabel().
LLColor4 LLFrameStats::sStatColors [static, private] |
Initial value:
{ LLColor4(0.0f, 0.5f, 1.0f, 0.5f), LLColor4(0.0f, 0.5f, 0.0f, 0.5f), LLColor4(0.0f, 0.0f, 1.0f, 0.5f), LLColor4(0.5f, 0.25f,0.5f, 0.5f), LLColor4(0.5f, 0.5f, 0.5f, 0.5f), LLColor4(0.5f, 1.0f, 0.0f, 0.5f), LLColor4(1.0f, 1.0f, 0.0f, 0.5f), LLColor4(0.0f, 0.0f, 1.0f, 0.5f), LLColor4(1.0f, 0.0f, 0.0f, 0.5f), LLColor4(0.5f, 0.0f, 0.0f, 0.5f), LLColor4(0.0f, 0.5f, 0.5f, 0.5f), LLColor4(0.5f, 1.0f, 1.0f, 0.5f), LLColor4(0.0f, 0.0f, 0.5f, 0.5f), LLColor4(1.0f, 0.0f, 1.0f, 0.5f), LLColor4(0.0f, 0.5f, 1.0f, 0.5f), LLColor4(1.0f, 1.0f, 1.0f, 0.5f), LLColor4(0.5f, 0.5f, 0.5f, 0.5f), LLColor4(1.0f, 0.0f, 0.0f, 0.5f) }
Definition at line 122 of file llframestats.h.
Referenced by getStatColor().
LLDynamicArray<FrameData> LLFrameStats::mFrameData [private] |
Definition at line 123 of file llframestats.h.
Referenced by addFrameData(), dump(), setTrackStats(), and ~LLFrameStats().