Add a virtual ToOSDMap() function to Monitoring.Stat for future
overloading by aggregation statistics and browser based stat viewers.user_profiles
parent
303e21babe
commit
76ee47c797
|
@ -29,6 +29,8 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using OpenMetaverse.StructuredData;
|
||||
|
||||
namespace OpenSim.Framework.Monitoring
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue