diff options
author | Melanie | 2013-07-13 00:57:03 +0100 |
---|---|---|
committer | Melanie | 2013-07-13 00:57:03 +0100 |
commit | c6d75cda974a69cd9fe3276bac182aa4c6bb1f17 (patch) | |
tree | 9d5abfecd2cce676a25cd94a3ca29daf62f2e608 /OpenSim/Framework/Monitoring/Stats | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Reinsert PhysicsActor variable back into SOP.SubscribeForCollisionEvents() in... (diff) | |
download | opensim-SC-c6d75cda974a69cd9fe3276bac182aa4c6bb1f17.zip opensim-SC-c6d75cda974a69cd9fe3276bac182aa4c6bb1f17.tar.gz opensim-SC-c6d75cda974a69cd9fe3276bac182aa4c6bb1f17.tar.bz2 opensim-SC-c6d75cda974a69cd9fe3276bac182aa4c6bb1f17.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs
Diffstat (limited to 'OpenSim/Framework/Monitoring/Stats')
-rwxr-xr-x | OpenSim/Framework/Monitoring/Stats/CounterStat.cs | 21 | ||||
-rw-r--r-- | OpenSim/Framework/Monitoring/Stats/Stat.cs | 1 |
2 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Framework/Monitoring/Stats/CounterStat.cs b/OpenSim/Framework/Monitoring/Stats/CounterStat.cs index caea30d..04442c3 100755 --- a/OpenSim/Framework/Monitoring/Stats/CounterStat.cs +++ b/OpenSim/Framework/Monitoring/Stats/CounterStat.cs | |||
@@ -224,5 +224,26 @@ public class CounterStat : Stat | |||
224 | } | 224 | } |
225 | } | 225 | } |
226 | } | 226 | } |
227 | |||
228 | // CounterStat is a basic stat plus histograms | ||
229 | public override OSDMap ToOSDMap() | ||
230 | { | ||
231 | // Get the foundational instance | ||
232 | OSDMap map = base.ToOSDMap(); | ||
233 | |||
234 | map["StatType"] = "CounterStat"; | ||
235 | |||
236 | // If there are any histograms, add a new field that is an array of histograms as OSDMaps | ||
237 | if (m_histograms.Count > 0) | ||
238 | { | ||
239 | OSDArray histos = new OSDArray(); | ||
240 | foreach (EventHistogram histo in m_histograms.Values) | ||
241 | { | ||
242 | histos.Add(histo.GetHistogramAsOSDMap()); | ||
243 | } | ||
244 | map.Add("Histograms", histos); | ||
245 | } | ||
246 | return map; | ||
247 | } | ||
227 | } | 248 | } |
228 | } | 249 | } |
diff --git a/OpenSim/Framework/Monitoring/Stats/Stat.cs b/OpenSim/Framework/Monitoring/Stats/Stat.cs index c57ee0c..9629b6e 100644 --- a/OpenSim/Framework/Monitoring/Stats/Stat.cs +++ b/OpenSim/Framework/Monitoring/Stats/Stat.cs | |||
@@ -242,6 +242,7 @@ namespace OpenSim.Framework.Monitoring | |||
242 | ret.Add("Description", OSD.FromString(Description)); | 242 | ret.Add("Description", OSD.FromString(Description)); |
243 | ret.Add("UnitName", OSD.FromString(UnitName)); | 243 | ret.Add("UnitName", OSD.FromString(UnitName)); |
244 | ret.Add("Value", OSD.FromReal(Value)); | 244 | ret.Add("Value", OSD.FromReal(Value)); |
245 | ret.Add("StatType", "Stat"); // used by overloading classes to denote type of stat | ||
245 | 246 | ||
246 | return ret; | 247 | return ret; |
247 | } | 248 | } |