diff options
author | onefang | 2019-05-19 21:24:15 +1000 |
---|---|---|
committer | onefang | 2019-05-19 21:24:15 +1000 |
commit | 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch) | |
tree | a9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Region/OptionalModules/UserStatistics/Clients_report.cs | |
parent | Add a build script. (diff) | |
download | opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2 opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz |
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/OptionalModules/UserStatistics/Clients_report.cs | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/OpenSim/Region/OptionalModules/UserStatistics/Clients_report.cs b/OpenSim/Region/OptionalModules/UserStatistics/Clients_report.cs index 4a6f7be..d3b97b1 100644 --- a/OpenSim/Region/OptionalModules/UserStatistics/Clients_report.cs +++ b/OpenSim/Region/OptionalModules/UserStatistics/Clients_report.cs | |||
@@ -97,9 +97,8 @@ namespace OpenSim.Region.UserStatistics | |||
97 | sdr.Read(); | 97 | sdr.Read(); |
98 | totalregions = Convert.ToInt32(sdr["regcnt"]); | 98 | totalregions = Convert.ToInt32(sdr["regcnt"]); |
99 | } | 99 | } |
100 | |||
101 | sdr.Close(); | 100 | sdr.Close(); |
102 | sdr.Dispose(); | 101 | cmd.Dispose(); |
103 | 102 | ||
104 | sql = | 103 | sql = |
105 | "select client_version, count(*) as cnt, avg(avg_sim_fps) as simfps from stats_session_data group by client_version order by count(*) desc LIMIT 10;"; | 104 | "select client_version, count(*) as cnt, avg(avg_sim_fps) as simfps from stats_session_data group by client_version order by count(*) desc LIMIT 10;"; |
@@ -116,20 +115,20 @@ namespace OpenSim.Region.UserStatistics | |||
116 | udata.fps = Convert.ToSingle(sdr["simfps"]); | 115 | udata.fps = Convert.ToSingle(sdr["simfps"]); |
117 | clidata.Add(udata); | 116 | clidata.Add(udata); |
118 | totalclients += udata.count; | 117 | totalclients += udata.count; |
119 | 118 | ||
120 | } | 119 | } |
121 | } | 120 | } |
122 | sdr.Close(); | 121 | sdr.Close(); |
123 | sdr.Dispose(); | 122 | cmd.Dispose(); |
124 | 123 | ||
125 | if (totalregions > 1) | 124 | if (totalregions > 1) |
126 | { | 125 | { |
127 | sql = | 126 | sql = |
128 | "select region_id, client_version, count(*) as cnt, avg(avg_sim_fps) as simfps from stats_session_data group by region_id, client_version order by region_id, count(*) desc;"; | 127 | "select region_id, client_version, count(*) as cnt, avg(avg_sim_fps) as simfps from stats_session_data group by region_id, client_version order by region_id, count(*) desc;"; |
129 | cmd = new SqliteCommand(sql, dbConn); | 128 | cmd = new SqliteCommand(sql, dbConn); |
130 | 129 | ||
131 | sdr = cmd.ExecuteReader(); | 130 | sdr = cmd.ExecuteReader(); |
132 | 131 | ||
133 | if (sdr.HasRows) | 132 | if (sdr.HasRows) |
134 | { | 133 | { |
135 | while (sdr.Read()) | 134 | while (sdr.Read()) |
@@ -143,16 +142,13 @@ namespace OpenSim.Region.UserStatistics | |||
143 | } | 142 | } |
144 | } | 143 | } |
145 | sdr.Close(); | 144 | sdr.Close(); |
146 | sdr.Dispose(); | 145 | cmd.Dispose(); |
147 | |||
148 | |||
149 | } | 146 | } |
150 | |||
151 | } | 147 | } |
152 | 148 | ||
153 | foreach (ClientVersionData cvd in cliRegData) | 149 | foreach (ClientVersionData cvd in cliRegData) |
154 | { | 150 | { |
155 | 151 | ||
156 | if (regionTotals.ContainsKey(cvd.region_id)) | 152 | if (regionTotals.ContainsKey(cvd.region_id)) |
157 | { | 153 | { |
158 | int regiontotal = (int)regionTotals[cvd.region_id]; | 154 | int regiontotal = (int)regionTotals[cvd.region_id]; |
@@ -163,9 +159,6 @@ namespace OpenSim.Region.UserStatistics | |||
163 | { | 159 | { |
164 | regionTotals.Add(cvd.region_id, cvd.count); | 160 | regionTotals.Add(cvd.region_id, cvd.count); |
165 | } | 161 | } |
166 | |||
167 | |||
168 | |||
169 | } | 162 | } |
170 | 163 | ||
171 | modeldata["ClientData"] = clidata; | 164 | modeldata["ClientData"] = clidata; |