diff options
author | David Walter Seikel | 2016-11-03 21:44:39 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-11-03 21:44:39 +1000 |
commit | 134f86e8d5c414409631b25b8c6f0ee45fbd8631 (patch) | |
tree | 216b89d3fb89acfb81be1e440c25c41ab09fa96d /OpenSim/Region/UserStatistics/SimStatsAJAX.cs | |
parent | More changing to production grid. Double oops. (diff) | |
download | opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.zip opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.gz opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.bz2 opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.xz |
Initial update to OpenSim 0.8.2.1 source code.
Diffstat (limited to 'OpenSim/Region/UserStatistics/SimStatsAJAX.cs')
-rw-r--r-- | OpenSim/Region/UserStatistics/SimStatsAJAX.cs | 223 |
1 files changed, 0 insertions, 223 deletions
diff --git a/OpenSim/Region/UserStatistics/SimStatsAJAX.cs b/OpenSim/Region/UserStatistics/SimStatsAJAX.cs deleted file mode 100644 index 28051fb..0000000 --- a/OpenSim/Region/UserStatistics/SimStatsAJAX.cs +++ /dev/null | |||
@@ -1,223 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections; | ||
30 | using System.Collections.Generic; | ||
31 | using System.Reflection; | ||
32 | using System.Text; | ||
33 | using Mono.Data.SqliteClient; | ||
34 | using OpenMetaverse; | ||
35 | using OpenSim.Region.Framework.Scenes; | ||
36 | using OpenSim.Framework.Monitoring; | ||
37 | |||
38 | namespace OpenSim.Region.UserStatistics | ||
39 | { | ||
40 | public class SimStatsAJAX : IStatsController | ||
41 | { | ||
42 | #region IStatsController Members | ||
43 | |||
44 | public string ReportName | ||
45 | { | ||
46 | get { return ""; } | ||
47 | } | ||
48 | |||
49 | public Hashtable ProcessModel(Hashtable pParams) | ||
50 | { | ||
51 | List<Scene> m_scene = (List<Scene>)pParams["Scenes"]; | ||
52 | |||
53 | Hashtable nh = new Hashtable(); | ||
54 | nh.Add("hdata", m_scene); | ||
55 | nh.Add("simstats", pParams["SimStats"]); | ||
56 | return nh; | ||
57 | } | ||
58 | |||
59 | public string RenderView(Hashtable pModelResult) | ||
60 | { | ||
61 | StringBuilder output = new StringBuilder(); | ||
62 | List<Scene> all_scenes = (List<Scene>) pModelResult["hdata"]; | ||
63 | Dictionary<UUID, USimStatsData> sdatadic = (Dictionary<UUID,USimStatsData>)pModelResult["simstats"]; | ||
64 | |||
65 | const string TableClass = "defaultr"; | ||
66 | const string TRClass = "defaultr"; | ||
67 | const string TDHeaderClass = "header"; | ||
68 | const string TDDataClass = "content"; | ||
69 | //const string TDDataClassRight = "contentright"; | ||
70 | const string TDDataClassCenter = "contentcenter"; | ||
71 | |||
72 | foreach (USimStatsData sdata in sdatadic.Values) | ||
73 | { | ||
74 | |||
75 | |||
76 | foreach (Scene sn in all_scenes) | ||
77 | { | ||
78 | if (sn.RegionInfo.RegionID == sdata.RegionId) | ||
79 | { | ||
80 | output.Append("<H2>"); | ||
81 | output.Append(sn.RegionInfo.RegionName); | ||
82 | output.Append("</H2>"); | ||
83 | } | ||
84 | } | ||
85 | HTMLUtil.TABLE_O(ref output, TableClass); | ||
86 | HTMLUtil.TR_O(ref output, TRClass); | ||
87 | HTMLUtil.TD_O(ref output, TDHeaderClass); | ||
88 | output.Append("Dilatn"); | ||
89 | HTMLUtil.TD_C(ref output); | ||
90 | HTMLUtil.TD_O(ref output, TDHeaderClass); | ||
91 | output.Append("SimFPS"); | ||
92 | HTMLUtil.TD_C(ref output); | ||
93 | HTMLUtil.TD_O(ref output, TDHeaderClass); | ||
94 | output.Append("PhysFPS"); | ||
95 | HTMLUtil.TD_C(ref output); | ||
96 | HTMLUtil.TD_O(ref output, TDHeaderClass); | ||
97 | output.Append("AgntUp"); | ||
98 | HTMLUtil.TD_C(ref output); | ||
99 | HTMLUtil.TD_O(ref output, TDHeaderClass); | ||
100 | output.Append("RootAg"); | ||
101 | HTMLUtil.TD_C(ref output); | ||
102 | HTMLUtil.TD_O(ref output, TDHeaderClass); | ||
103 | output.Append("ChldAg"); | ||
104 | HTMLUtil.TD_C(ref output); | ||
105 | HTMLUtil.TD_O(ref output, TDHeaderClass); | ||
106 | output.Append("Prims"); | ||
107 | HTMLUtil.TD_C(ref output); | ||
108 | HTMLUtil.TD_O(ref output, TDHeaderClass); | ||
109 | output.Append("ATvPrm"); | ||
110 | HTMLUtil.TD_C(ref output); | ||
111 | HTMLUtil.TD_O(ref output, TDHeaderClass); | ||
112 | output.Append("AtvScr"); | ||
113 | HTMLUtil.TD_C(ref output); | ||
114 | HTMLUtil.TD_O(ref output, TDHeaderClass); | ||
115 | output.Append("ScrLPS"); | ||
116 | HTMLUtil.TD_C(ref output); | ||
117 | HTMLUtil.TR_C(ref output); | ||
118 | HTMLUtil.TR_O(ref output, TRClass); | ||
119 | HTMLUtil.TD_O(ref output, TDDataClass); | ||
120 | output.Append(sdata.TimeDilation); | ||
121 | HTMLUtil.TD_C(ref output); | ||
122 | HTMLUtil.TD_O(ref output, TDDataClass); | ||
123 | output.Append(sdata.SimFps); | ||
124 | HTMLUtil.TD_C(ref output); | ||
125 | HTMLUtil.TD_O(ref output, TDDataClassCenter); | ||
126 | output.Append(sdata.PhysicsFps); | ||
127 | HTMLUtil.TD_C(ref output); | ||
128 | HTMLUtil.TD_O(ref output, TDDataClassCenter); | ||
129 | output.Append(sdata.AgentUpdates); | ||
130 | HTMLUtil.TD_C(ref output); | ||
131 | HTMLUtil.TD_O(ref output, TDDataClassCenter); | ||
132 | output.Append(sdata.RootAgents); | ||
133 | HTMLUtil.TD_C(ref output); | ||
134 | HTMLUtil.TD_O(ref output, TDDataClassCenter); | ||
135 | output.Append(sdata.ChildAgents); | ||
136 | HTMLUtil.TD_C(ref output); | ||
137 | HTMLUtil.TD_O(ref output, TDDataClassCenter); | ||
138 | output.Append(sdata.TotalPrims); | ||
139 | HTMLUtil.TD_C(ref output); | ||
140 | HTMLUtil.TD_O(ref output, TDDataClassCenter); | ||
141 | output.Append(sdata.ActivePrims); | ||
142 | HTMLUtil.TD_C(ref output); | ||
143 | HTMLUtil.TD_O(ref output, TDDataClassCenter); | ||
144 | output.Append(sdata.ActiveScripts); | ||
145 | HTMLUtil.TD_C(ref output); | ||
146 | HTMLUtil.TD_O(ref output, TDDataClassCenter); | ||
147 | output.Append(sdata.ScriptLinesPerSecond); | ||
148 | HTMLUtil.TD_C(ref output); | ||
149 | HTMLUtil.TR_C(ref output); | ||
150 | HTMLUtil.TR_O(ref output, TRClass); | ||
151 | HTMLUtil.TD_O(ref output, TDHeaderClass); | ||
152 | output.Append("FrmMS"); | ||
153 | HTMLUtil.TD_C(ref output); | ||
154 | HTMLUtil.TD_O(ref output, TDHeaderClass); | ||
155 | output.Append("AgtMS"); | ||
156 | HTMLUtil.TD_C(ref output); | ||
157 | HTMLUtil.TD_O(ref output, TDHeaderClass); | ||
158 | output.Append("PhysMS"); | ||
159 | HTMLUtil.TD_C(ref output); | ||
160 | HTMLUtil.TD_O(ref output, TDHeaderClass); | ||
161 | output.Append("OthrMS"); | ||
162 | HTMLUtil.TD_C(ref output); | ||
163 | HTMLUtil.TD_O(ref output, TDHeaderClass); | ||
164 | output.Append("ScrLPS"); | ||
165 | HTMLUtil.TD_C(ref output); | ||
166 | HTMLUtil.TD_O(ref output, TDHeaderClass); | ||
167 | output.Append("OutPPS"); | ||
168 | HTMLUtil.TD_C(ref output); | ||
169 | HTMLUtil.TD_O(ref output, TDHeaderClass); | ||
170 | output.Append("InPPS"); | ||
171 | HTMLUtil.TD_C(ref output); | ||
172 | HTMLUtil.TD_O(ref output, TDHeaderClass); | ||
173 | output.Append("NoAckKB"); | ||
174 | HTMLUtil.TD_C(ref output); | ||
175 | HTMLUtil.TD_O(ref output, TDHeaderClass); | ||
176 | output.Append("PndDWN"); | ||
177 | HTMLUtil.TD_C(ref output); | ||
178 | HTMLUtil.TD_O(ref output, TDHeaderClass); | ||
179 | output.Append("PndUP"); | ||
180 | HTMLUtil.TD_C(ref output); | ||
181 | HTMLUtil.TR_C(ref output); | ||
182 | HTMLUtil.TR_O(ref output, TRClass); | ||
183 | HTMLUtil.TD_O(ref output, TDDataClass); | ||
184 | output.Append(sdata.TotalFrameTime); | ||
185 | HTMLUtil.TD_C(ref output); | ||
186 | HTMLUtil.TD_O(ref output, TDDataClass); | ||
187 | output.Append(sdata.AgentFrameTime); | ||
188 | HTMLUtil.TD_C(ref output); | ||
189 | HTMLUtil.TD_O(ref output, TDDataClassCenter); | ||
190 | output.Append(sdata.PhysicsFrameTime); | ||
191 | HTMLUtil.TD_C(ref output); | ||
192 | HTMLUtil.TD_O(ref output, TDDataClassCenter); | ||
193 | output.Append(sdata.OtherFrameTime); | ||
194 | HTMLUtil.TD_C(ref output); | ||
195 | HTMLUtil.TD_O(ref output, TDDataClassCenter); | ||
196 | output.Append(sdata.ScriptLinesPerSecond); | ||
197 | HTMLUtil.TD_C(ref output); | ||
198 | HTMLUtil.TD_O(ref output, TDDataClassCenter); | ||
199 | output.Append(sdata.OutPacketsPerSecond); | ||
200 | HTMLUtil.TD_C(ref output); | ||
201 | HTMLUtil.TD_O(ref output, TDDataClassCenter); | ||
202 | output.Append(sdata.InPacketsPerSecond); | ||
203 | HTMLUtil.TD_C(ref output); | ||
204 | HTMLUtil.TD_O(ref output, TDDataClassCenter); | ||
205 | output.Append(sdata.UnackedBytes); | ||
206 | HTMLUtil.TD_C(ref output); | ||
207 | HTMLUtil.TD_O(ref output, TDDataClassCenter); | ||
208 | output.Append(sdata.PendingDownloads); | ||
209 | HTMLUtil.TD_C(ref output); | ||
210 | HTMLUtil.TD_O(ref output, TDDataClassCenter); | ||
211 | output.Append(sdata.PendingUploads); | ||
212 | HTMLUtil.TD_C(ref output); | ||
213 | HTMLUtil.TR_C(ref output); | ||
214 | HTMLUtil.TABLE_C(ref output); | ||
215 | |||
216 | } | ||
217 | |||
218 | return output.ToString(); | ||
219 | } | ||
220 | |||
221 | #endregion | ||
222 | } | ||
223 | } | ||