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/llviewerstats.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 '')
-rw-r--r-- | linden/indra/newview/llviewerstats.h | 186 |
1 files changed, 186 insertions, 0 deletions
diff --git a/linden/indra/newview/llviewerstats.h b/linden/indra/newview/llviewerstats.h new file mode 100644 index 0000000..9b446ec --- /dev/null +++ b/linden/indra/newview/llviewerstats.h | |||
@@ -0,0 +1,186 @@ | |||
1 | /** | ||
2 | * @file llviewerstats.h | ||
3 | * @brief LLViewerStats class header file | ||
4 | * | ||
5 | * Copyright (c) 2002-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_LLVIEWERSTATS_H | ||
29 | #define LL_LLVIEWERSTATS_H | ||
30 | |||
31 | #include "llstat.h" | ||
32 | |||
33 | class LLViewerStats | ||
34 | { | ||
35 | public: | ||
36 | LLStat mKBitStat; | ||
37 | LLStat mLayersKBitStat; | ||
38 | LLStat mObjectKBitStat; | ||
39 | LLStat mAssetKBitStat; | ||
40 | LLStat mTextureKBitStat; | ||
41 | LLStat mVFSPendingOperations; | ||
42 | LLStat mObjectsDrawnStat; | ||
43 | LLStat mObjectsCulledStat; | ||
44 | LLStat mObjectsTestedStat; | ||
45 | LLStat mObjectsComparedStat; | ||
46 | LLStat mObjectsOccludedStat; | ||
47 | LLStat mFPSStat; | ||
48 | LLStat mPacketsInStat; | ||
49 | LLStat mPacketsLostStat; | ||
50 | LLStat mPacketsOutStat; | ||
51 | LLStat mPacketsLostPercentStat; | ||
52 | LLStat mTexturePacketsStat; | ||
53 | LLStat mActualInKBitStat; // From the packet ring (when faking a bad connection) | ||
54 | LLStat mActualOutKBitStat; // From the packet ring (when faking a bad connection) | ||
55 | |||
56 | // Simulator stats | ||
57 | LLStat mSimTimeDilation; | ||
58 | |||
59 | LLStat mSimFPS; | ||
60 | LLStat mSimPhysicsFPS; | ||
61 | LLStat mSimAgentUPS; | ||
62 | LLStat mSimLSLIPS; | ||
63 | |||
64 | LLStat mSimFrameMsec; | ||
65 | LLStat mSimNetMsec; | ||
66 | LLStat mSimSimOtherMsec; | ||
67 | LLStat mSimSimPhysicsMsec; | ||
68 | LLStat mSimAgentMsec; | ||
69 | LLStat mSimImagesMsec; | ||
70 | LLStat mSimScriptMsec; | ||
71 | |||
72 | LLStat mSimMainAgents; | ||
73 | LLStat mSimChildAgents; | ||
74 | LLStat mSimObjects; | ||
75 | LLStat mSimActiveObjects; | ||
76 | LLStat mSimActiveScripts; | ||
77 | |||
78 | LLStat mSimInPPS; | ||
79 | LLStat mSimOutPPS; | ||
80 | LLStat mSimPendingDownloads; | ||
81 | LLStat mSimPendingUploads; | ||
82 | LLStat mSimPendingLocalUploads; | ||
83 | LLStat mSimTotalUnackedBytes; | ||
84 | |||
85 | /* | ||
86 | LLStat mSimCPUUsageStat; | ||
87 | LLStat mSimMemTotalStat; | ||
88 | LLStat mSimMemRSSStat; | ||
89 | */ | ||
90 | |||
91 | |||
92 | LLStat mSimPingStat; | ||
93 | LLStat mUserserverPingStat; | ||
94 | |||
95 | void resetStats(); | ||
96 | public: | ||
97 | // If you change this, please also add a corresponding text label | ||
98 | // in statTypeToText in llviewerstats.cpp | ||
99 | enum EStatType | ||
100 | { | ||
101 | ST_MOUSELOOK_SECONDS = 0, | ||
102 | ST_AVATAR_EDIT_SECONDS = 1, | ||
103 | ST_TOOLBOX_SECONDS = 2, | ||
104 | ST_CHAT_COUNT = 3, | ||
105 | ST_IM_COUNT = 4, | ||
106 | ST_FULLSCREEN_BOOL = 5, | ||
107 | ST_RELEASE_COUNT= 6, | ||
108 | ST_CREATE_COUNT = 7, | ||
109 | ST_REZ_COUNT = 8, | ||
110 | ST_FPS_10_SECONDS = 9, | ||
111 | ST_FPS_5_SECONDS = 10, | ||
112 | ST_FPS_2_SECONDS = 11, | ||
113 | ST_FLY_COUNT = 12, | ||
114 | ST_TELEPORT_COUNT = 13, | ||
115 | ST_OBJECT_DELETE_COUNT = 14, | ||
116 | ST_SNAPSHOT_COUNT = 15, | ||
117 | ST_UPLOAD_SOUND_COUNT = 16, | ||
118 | ST_UPLOAD_TEXTURE_COUNT = 17, | ||
119 | ST_EDIT_TEXTURE_COUNT = 18, | ||
120 | ST_KILLED_COUNT = 19, | ||
121 | ST_FRAMETIME_JITTER = 20, | ||
122 | ST_FRAMETIME_SLEW = 21, | ||
123 | ST_INVENTORY_TOO_LONG = 22, | ||
124 | ST_WEARABLES_TOO_LONG = 23, | ||
125 | ST_LOGIN_SECONDS = 24, | ||
126 | ST_LOGIN_TIMEOUT_COUNT = 25, | ||
127 | ST_HAS_BAD_TIMER = 26, | ||
128 | ST_DOWNLOAD_FAILED = 27, | ||
129 | ST_LSL_SAVE_COUNT = 28, | ||
130 | ST_UPLOAD_ANIM_COUNT = 29, | ||
131 | ST_FPS_8_SECONDS = 30, | ||
132 | ST_SIM_FPS_20_SECONDS = 31, | ||
133 | ST_PHYS_FPS_20_SECONDS = 32, | ||
134 | ST_LOSS_05_SECONDS = 33, | ||
135 | ST_FPS_DROP_50_RATIO = 34, | ||
136 | ST_MEDIA_OBJECT_LIST_LENGTH = 35, | ||
137 | ST_DELTA_BANDWIDTH = 36, | ||
138 | ST_MAX_BANDWIDTH = 37, | ||
139 | ST_LIGHTING_DETAIL = 38, | ||
140 | ST_VISIBLE_AVATARS = 39, | ||
141 | ST_SHADER_OBJECTS = 40, | ||
142 | ST_SHADER_ENVIRONMENT = 41, | ||
143 | ST_DRAW_DIST = 42, | ||
144 | ST_CHAT_BUBBLES = 43, | ||
145 | ST_SHADER_AVATAR = 44, | ||
146 | ST_FRAME_SECS = 45, | ||
147 | ST_UPDATE_SECS = 46, | ||
148 | ST_NETWORK_SECS = 47, | ||
149 | ST_IMAGE_SECS = 48, | ||
150 | ST_REBUILD_SECS = 49, | ||
151 | ST_RENDER_SECS = 50, | ||
152 | ST_CROSSING_AVG = 51, | ||
153 | ST_CROSSING_MAX = 52, | ||
154 | ST_LIBXUL_WIDGET_USED = 53, | ||
155 | ST_WINDOW_WIDTH = 54, | ||
156 | ST_WINDOW_HEIGHT = 55, | ||
157 | ST_TEX_BAKES = 56, | ||
158 | ST_TEX_REBAKES = 57, | ||
159 | |||
160 | ST_COUNT = 58 | ||
161 | }; | ||
162 | |||
163 | |||
164 | LLViewerStats(); | ||
165 | ~LLViewerStats(); | ||
166 | |||
167 | // all return latest value of given stat | ||
168 | F64 getStat(EStatType type) const; | ||
169 | F64 setStat(EStatType type, F64 value); // set the stat to value | ||
170 | F64 incStat(EStatType type, F64 value = 1.f); // add value to the stat | ||
171 | |||
172 | void updateFrameStats(const F64 time_diff); | ||
173 | |||
174 | void addToMessage() const; | ||
175 | |||
176 | static const char *statTypeToText(EStatType type); | ||
177 | |||
178 | private: | ||
179 | F64 mStats[ST_COUNT]; | ||
180 | |||
181 | F64 mLastTimeDiff; // used for time stat updates | ||
182 | }; | ||
183 | |||
184 | extern LLViewerStats *gViewerStats; | ||
185 | |||
186 | #endif // LL_LLVIEWERSTATS_H | ||