diff options
author | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
commit | 38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch) | |
tree | adca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/newview/llframestats.h | |
parent | README.txt (diff) | |
download | meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.zip meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.gz meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.bz2 meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.xz |
Second Life viewer sources 1.13.2.12
Diffstat (limited to 'linden/indra/newview/llframestats.h')
-rw-r--r-- | linden/indra/newview/llframestats.h | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/linden/indra/newview/llframestats.h b/linden/indra/newview/llframestats.h new file mode 100644 index 0000000..faaaa91 --- /dev/null +++ b/linden/indra/newview/llframestats.h | |||
@@ -0,0 +1,126 @@ | |||
1 | /** | ||
2 | * @file llframestats.h | ||
3 | * @brief LLFrameStats class definition | ||
4 | * | ||
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | ||
6 | * | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
8 | * to you under the terms of the GNU General Public License, version 2.0 | ||
9 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
10 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
11 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
12 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
13 | * | ||
14 | * There are special exceptions to the terms and conditions of the GPL as | ||
15 | * it is applied to this Source Code. View the full text of the exception | ||
16 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
17 | * online at http://secondlife.com/developers/opensource/flossexception | ||
18 | * | ||
19 | * By copying, modifying or distributing this software, you acknowledge | ||
20 | * that you have read and understood your obligations described above, | ||
21 | * and agree to abide by those obligations. | ||
22 | * | ||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
25 | * COMPLETENESS OR PERFORMANCE. | ||
26 | */ | ||
27 | |||
28 | #ifndef LL_LLFRAMESTATS_H | ||
29 | #define LL_LLFRAMESTATS_H | ||
30 | |||
31 | #include "stdtypes.h" | ||
32 | #include "llstat.h" | ||
33 | #include "llstring.h" | ||
34 | #include "lldarray.h" | ||
35 | #include "v4color.h" | ||
36 | #include "lltimer.h" | ||
37 | |||
38 | class LLFrameStats | ||
39 | { | ||
40 | public: | ||
41 | // Affects sStatLabels and sStatColors in llframestats.cpp | ||
42 | enum EStat | ||
43 | { | ||
44 | IDLE_NETWORK, | ||
45 | AGENT_MISC, | ||
46 | OBJECT_UPDATE, | ||
47 | CLEAN_DEAD, | ||
48 | UPDATE_EFFECTS, | ||
49 | IMAGE_UPDATE, | ||
50 | UPDATE_MOVE, | ||
51 | UPDATE_PARTICLES, | ||
52 | UPDATE_CULL, | ||
53 | UPDATE_GEOM, | ||
54 | AUDIO, | ||
55 | UPDATE_TEX_STATS, | ||
56 | STATE_SORT, | ||
57 | REBUILD, | ||
58 | RENDER_SYNC, | ||
59 | RENDER_GEOM, | ||
60 | RENDER_UI, | ||
61 | MISC_END, | ||
62 | NUM_STATS | ||
63 | }; | ||
64 | |||
65 | LLFrameStats(); | ||
66 | virtual ~LLFrameStats(); | ||
67 | |||
68 | void setFilename(const std::string& filename) { mFilename = filename; } | ||
69 | void setSummaryFilename(const std::string& filename) { mSummaryFilename = filename; } | ||
70 | |||
71 | void setTrackStats(const BOOL track_stats); | ||
72 | |||
73 | void start(const EStat stat_name); | ||
74 | |||
75 | void addFrameData(); | ||
76 | |||
77 | void dump(); | ||
78 | |||
79 | const char *getCurStatName() const; | ||
80 | |||
81 | LLStat &getStat(const S32 i) { return mStats[i]; } | ||
82 | const char *getStatLabel(const S32 i) const { return sStatLabels[i]; } | ||
83 | LLColor4 getStatColor(const S32 i) const { return sStatColors[i]; } | ||
84 | |||
85 | static void startLogging(void *); | ||
86 | static void stopLogging(void *); | ||
87 | static void timedLogging60(void *); | ||
88 | static void timedLogging30(void *); | ||
89 | static void timedLogging10(void *); | ||
90 | private: | ||
91 | class FrameData | ||
92 | { | ||
93 | public: | ||
94 | FrameData() {}; | ||
95 | F32 mDuration[NUM_STATS]; | ||
96 | F32 mTotalDuration; | ||
97 | S32 mNumTriangles; | ||
98 | S32 mNumObjects; | ||
99 | S32 mNumVisibleObjects; | ||
100 | S32 mNumFullUpdates; | ||
101 | S32 mNumTerseUpdates; | ||
102 | F32 mTotalVorbisTime; | ||
103 | F32 mLongVorbisTime; | ||
104 | S32 mNumVorbisDecodes; | ||
105 | }; | ||
106 | |||
107 | LLString mFilename; | ||
108 | LLString mSummaryFilename; | ||
109 | |||
110 | BOOL mTrackStats; | ||
111 | LLTimer mTimer; | ||
112 | BOOL mUseTimer; | ||
113 | F32 mStopTime; | ||
114 | |||
115 | EStat mCurrentStat; | ||
116 | |||
117 | LLStat mStats[NUM_STATS]; | ||
118 | static char *sStatLabels[NUM_STATS]; | ||
119 | static LLColor4 sStatColors[NUM_STATS]; | ||
120 | LLDynamicArray<FrameData> mFrameData; | ||
121 | void stop(); | ||
122 | }; | ||
123 | |||
124 | extern LLFrameStats gFrameStats; | ||
125 | |||
126 | #endif // LL_LLFRAMESTATS_H | ||