Add a virtual ToOSDMap() function to Monitoring.Stat for future
overloading by aggregation statistics and browser based stat viewers.0.7.4-extended
parent
d99441de25
commit
7d63676cfc
|
@ -29,6 +29,8 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
|
using OpenMetaverse.StructuredData;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Monitoring
|
namespace OpenSim.Framework.Monitoring
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -216,6 +218,20 @@ namespace OpenSim.Framework.Monitoring
|
||||||
return sb.ToString();
|
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)
|
protected void AppendMeasuresOfInterest(StringBuilder sb)
|
||||||
{
|
{
|
||||||
if ((MeasuresOfInterest & MeasuresOfInterest.AverageChangeOverTime)
|
if ((MeasuresOfInterest & MeasuresOfInterest.AverageChangeOverTime)
|
||||||
|
|
Loading…
Reference in New Issue