diff options
author | Merov Linden <merov@lindenlab.com> | 2013-05-02 17:37:29 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2013-05-02 17:37:29 -0700 |
commit | 2a7d604e87df5a48bfb0abeb0d7b897a117005fb (patch) | |
tree | 783a46ee6f16e484ac35b933bace359b2eb2d1b8 /indra/newview/llviewerstats.cpp | |
parent | cc7440d0853d269a5b955ab021db729ed5b6a92c (diff) | |
parent | 043f2e0bfd40d29464175de838e3a36aad6e81df (diff) |
ACME-306 : Pull merge from viewer-chui
Diffstat (limited to 'indra/newview/llviewerstats.cpp')
-rw-r--r-- | indra/newview/llviewerstats.cpp | 47 |
1 files changed, 28 insertions, 19 deletions
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 35839ae459..35bba4184e 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -752,25 +752,6 @@ void LLViewerStats::PhaseMap::startPhase(const std::string& phase_name) timer.unpause(); } -void LLViewerStats::PhaseMap::stopPhase(const std::string& phase_name) -{ - phase_map_t::iterator iter = mPhaseMap.find(phase_name); - if (iter != mPhaseMap.end()) - { - if (iter->second.getStarted()) - { - // Going from started to paused state - record stats. - recordPhaseStat(phase_name,iter->second.getElapsedTimeF32()); - } - lldebugs << "stopPhase " << phase_name << llendl; - iter->second.pause(); - } - else - { - lldebugs << "stopPhase " << phase_name << " is not started, no-op" << llendl; - } -} - void LLViewerStats::PhaseMap::stopAllPhases() { for (phase_map_t::iterator iter = mPhaseMap.begin(); @@ -814,6 +795,19 @@ LLViewerStats::PhaseMap::PhaseMap() { } + +void LLViewerStats::PhaseMap::stopPhase(const std::string& phase_name) +{ + phase_map_t::iterator iter = mPhaseMap.find(phase_name); + if (iter != mPhaseMap.end()) + { + if (iter->second.getStarted()) + { + // Going from started to stopped state - record stats. + iter->second.stop(); + } + } +} // static LLViewerStats::StatsAccumulator& LLViewerStats::PhaseMap::getPhaseStats(const std::string& phase_name) { @@ -833,3 +827,18 @@ void LLViewerStats::PhaseMap::recordPhaseStat(const std::string& phase_name, F32 stats.push(value); } + +bool LLViewerStats::PhaseMap::getPhaseValues(const std::string& phase_name, F32& elapsed, bool& completed) +{ + phase_map_t::iterator iter = mPhaseMap.find(phase_name); + if (iter != mPhaseMap.end()) + { + elapsed = iter->second.getElapsedTimeF32(); + completed = !iter->second.getStarted(); + return true; + } + else + { + return false; + } +} |