summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerstats.cpp
diff options
context:
space:
mode:
authordolphin <dolphin@lindenlab.com>2014-06-17 13:09:15 -0700
committerdolphin <dolphin@lindenlab.com>2014-06-17 13:09:15 -0700
commit299921de323eb9b6844cd7b6f6b8da3490ee3747 (patch)
treedcb4c5c257622c20014a0b986dc8e2d1c25a10c7 /indra/newview/llviewerstats.cpp
parent89ea1cbc7acee8878c36a5795dd3df12a913c513 (diff)
parent977476171ddcc057d7c28b6c14ae988b8189ed75 (diff)
Merge with 3.7.9-release
Diffstat (limited to 'indra/newview/llviewerstats.cpp')
-rwxr-xr-xindra/newview/llviewerstats.cpp59
1 files changed, 24 insertions, 35 deletions
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index d5ae2d1030..f60829e9e8 100755
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -412,18 +412,19 @@ void update_statistics()
class ViewerStatsResponder : public LLHTTPClient::Responder
{
+ LOG_CLASS(ViewerStatsResponder);
public:
- ViewerStatsResponder() { }
+ ViewerStatsResponder() { }
- void error(U32 statusNum, const std::string& reason)
- {
- LL_INFOS() << "ViewerStatsResponder::error " << statusNum << " "
- << reason << LL_ENDL;
- }
+private:
+ /* virtual */ void httpFailure()
+ {
+ LL_WARNS() << dumpResponse() << LL_ENDL;
+ }
- void result(const LLSD& content)
- {
- LL_INFOS() << "ViewerStatsResponder::result" << LL_ENDL;
+ /* virtual */ void httpSuccess()
+ {
+ LL_INFOS() << "OK" << LL_ENDL;
}
};
@@ -622,44 +623,28 @@ void send_stats()
LLViewerStats::instance().getRecording().resume();
}
-LLFrameTimer& LLViewerStats::PhaseMap::getPhaseTimer(const std::string& phase_name)
+LLTimer& LLViewerStats::PhaseMap::getPhaseTimer(const std::string& phase_name)
{
phase_map_t::iterator iter = mPhaseMap.find(phase_name);
if (iter == mPhaseMap.end())
{
- LLFrameTimer timer;
+ LLTimer timer;
mPhaseMap[phase_name] = timer;
}
- LLFrameTimer& timer = mPhaseMap[phase_name];
+ LLTimer& timer = mPhaseMap[phase_name];
return timer;
}
void LLViewerStats::PhaseMap::startPhase(const std::string& phase_name)
{
- LLFrameTimer& timer = getPhaseTimer(phase_name);
- LL_DEBUGS() << "startPhase " << phase_name << LL_ENDL;
- timer.unpause();
-}
-
-void LLViewerStats::PhaseMap::stopAllPhases()
-{
- for (phase_map_t::iterator iter = mPhaseMap.begin();
- iter != mPhaseMap.end(); ++iter)
- {
- const std::string& phase_name = iter->first;
- if (iter->second.getStarted())
- {
- // Going from started to paused state - record stats.
- recordPhaseStat(phase_name,iter->second.getElapsedTimeF32());
- }
- LL_DEBUGS() << "stopPhase (all) " << phase_name << LL_ENDL;
- iter->second.pause();
- }
+ LLTimer& timer = getPhaseTimer(phase_name);
+ timer.start();
+ //LL_DEBUGS("Avatar") << "startPhase " << phase_name << LL_ENDL;
}
void LLViewerStats::PhaseMap::clearPhases()
{
- LL_DEBUGS() << "clearPhases" << LL_ENDL;
+ //LL_DEBUGS("Avatar") << "clearPhases" << LL_ENDL;
mPhaseMap.clear();
}
@@ -684,7 +669,6 @@ LLViewerStats::PhaseMap::PhaseMap()
{
}
-
void LLViewerStats::PhaseMap::stopPhase(const std::string& phase_name)
{
phase_map_t::iterator iter = mPhaseMap.find(phase_name);
@@ -697,6 +681,7 @@ void LLViewerStats::PhaseMap::stopPhase(const std::string& phase_name)
}
}
}
+
// static
LLViewerStats::StatsAccumulator& LLViewerStats::PhaseMap::getPhaseStats(const std::string& phase_name)
{
@@ -720,14 +705,18 @@ void LLViewerStats::PhaseMap::recordPhaseStat(const std::string& phase_name, F32
bool LLViewerStats::PhaseMap::getPhaseValues(const std::string& phase_name, F32& elapsed, bool& completed)
{
phase_map_t::iterator iter = mPhaseMap.find(phase_name);
+ bool found = false;
if (iter != mPhaseMap.end())
{
+ found = true;
elapsed = iter->second.getElapsedTimeF32();
completed = !iter->second.getStarted();
- return true;
+ //LL_DEBUGS("Avatar") << " phase_name " << phase_name << " elapsed " << elapsed << " completed " << completed << " timer addr " << (S32)(&iter->second) << LL_ENDL;
}
else
{
- return false;
+ //LL_DEBUGS("Avatar") << " phase_name " << phase_name << " NOT FOUND" << LL_ENDL;
}
+
+ return found;
}