diff --git a/OpenSim/Framework/Monitoring/Stats/Stat.cs b/OpenSim/Framework/Monitoring/Stats/Stat.cs index fccc4601ca..c8d91744c1 100644 --- a/OpenSim/Framework/Monitoring/Stats/Stat.cs +++ b/OpenSim/Framework/Monitoring/Stats/Stat.cs @@ -29,6 +29,8 @@ using System; using System.Collections.Generic; using System.Text; +using OpenMetaverse.StructuredData; + namespace OpenSim.Framework.Monitoring { /// @@ -216,6 +218,20 @@ namespace OpenSim.Framework.Monitoring return sb.ToString(); } + public virtual OSDMap ToOSDMap() + { + OSDMap ret = new OSDMap(); + ret.Add("Category", OSD.FromString(Category)); + ret.Add("Container", OSD.FromString(Container)); + ret.Add("ShortName", OSD.FromString(ShortName)); + ret.Add("Name", OSD.FromString(Name)); + ret.Add("Description", OSD.FromString(Description)); + ret.Add("UnitName", OSD.FromString(UnitName)); + ret.Add("Value", OSD.FromReal(Value)); + + return ret; + } + protected void AppendMeasuresOfInterest(StringBuilder sb) { if ((MeasuresOfInterest & MeasuresOfInterest.AverageChangeOverTime)