29 using System.Collections.Generic;
33 using OpenMetaverse.StructuredData;
35 namespace OpenSim.Framework.Monitoring
41 private SortedDictionary<string, EventHistogram> m_histograms;
42 private object counterLock =
new object();
52 : base(shortName, name, description, unitName, category, container,
StatType.
Push, null, verbosity)
54 m_histograms =
new SortedDictionary<string, EventHistogram>();
61 m_histograms.Add(histoName, histo);
64 public delegate
void ProcessHistogram(
string name,
EventHistogram histo);
67 foreach (KeyValuePair<string, EventHistogram> kvp
in m_histograms)
69 process(kvp.Key, kvp.Value);
96 OSDMap map = base.ToOSDMap();
98 map[
"StatType"] =
"CounterStat";
101 if (m_histograms.Count > 0)
105 if (m_histograms.Count > 0)
110 histos.Add(histo.GetHistogramAsOSDMap());
112 map.Add(
"Histograms", histos);
override OSDMap ToOSDMap()
CounterStat(string shortName, string name, string description, string unitName, string category, string container, StatVerbosity verbosity)
OpenMetaverse.StructuredData.OSDArray OSDArray
void ForEachHistogram(ProcessHistogram process)
OpenMetaverse.StructuredData.OSDMap OSDMap
Holds individual statistic details
void AddHistogram(string histoName, EventHistogram histo)
StatVerbosity
Verbosity of stat.