summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerstats.cpp
diff options
context:
space:
mode:
authorsimon <none@none>2013-04-11 16:23:36 -0700
committersimon <none@none>2013-04-11 16:23:36 -0700
commit066f2acadf6f1624fcdfc22263a890c370473887 (patch)
treea4e52b29d8074cdc8782ff28b9b0500b32dada50 /indra/newview/llviewerstats.cpp
parent98a82c50d539451e1931826ca75fbc01d611806d (diff)
parent460c81070e5fa1c51ce7e186a9ecb8c5f1c995e1 (diff)
Forgot to commit @#! merge
Diffstat (limited to 'indra/newview/llviewerstats.cpp')
-rw-r--r--indra/newview/llviewerstats.cpp47
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;
+ }
+}