diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-04-19 14:52:44 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-04-19 14:52:44 -0400 |
commit | 7fbf42dec8bae638b62676c280b3f042f9458057 (patch) | |
tree | 28949f9335c16f4e814bd3607383a24ab770427f /indra/newview/llviewerstats.h | |
parent | adf5b5c1efaed30dc043652b174d76c9088f4b18 (diff) |
Move phase tracking to its own set of classes inside LLViewerStats - simplifies llvoavatar and allows adding such tracking to classes that live outside the avatar lifetime
Diffstat (limited to 'indra/newview/llviewerstats.h')
-rwxr-xr-x | indra/newview/llviewerstats.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index 718fabc75a..750d963f69 100755 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -274,7 +274,28 @@ public: }; StatsAccumulator mAgentPositionSnaps; - + + // Phase tracking (originally put in for avatar rezzing), tracking + // progress of active/completed phases for activities like outfit changing. + typedef std::map<std::string,LLFrameTimer> phase_map_t; + typedef std::map<std::string,StatsAccumulator> phase_stats_t; + class PhaseMap + { + private: + phase_map_t mPhaseMap; + static phase_stats_t sStats; + public: + PhaseMap(); + LLFrameTimer& getPhaseTimer(const std::string& phase_name); + void startPhase(const std::string& phase_name); + void stopPhase(const std::string& phase_name); + void stopAllPhases(); + void clearPhases(); + LLSD dumpPhases(); + static StatsAccumulator& getPhaseStats(const std::string& phase_name); + static void recordPhaseStat(const std::string& phase_name, F32 value); + }; + private: F64 mStats[ST_COUNT]; |