diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Monitoring/Stats/PercentageStat.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/OpenSim/Framework/Monitoring/Stats/PercentageStat.cs b/OpenSim/Framework/Monitoring/Stats/PercentageStat.cs index 60bed55..55ddf06 100644 --- a/OpenSim/Framework/Monitoring/Stats/PercentageStat.cs +++ b/OpenSim/Framework/Monitoring/Stats/PercentageStat.cs | |||
@@ -29,6 +29,8 @@ using System; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Text; | 30 | using System.Text; |
31 | 31 | ||
32 | using OpenMetaverse.StructuredData; | ||
33 | |||
32 | namespace OpenSim.Framework.Monitoring | 34 | namespace OpenSim.Framework.Monitoring |
33 | { | 35 | { |
34 | public class PercentageStat : Stat | 36 | public class PercentageStat : Stat |
@@ -84,5 +86,19 @@ namespace OpenSim.Framework.Monitoring | |||
84 | 86 | ||
85 | return sb.ToString(); | 87 | return sb.ToString(); |
86 | } | 88 | } |
89 | |||
90 | // PercentageStat is a basic stat plus percent calc | ||
91 | public override OSDMap ToOSDMap() | ||
92 | { | ||
93 | // Get the foundational instance | ||
94 | OSDMap map = base.ToOSDMap(); | ||
95 | |||
96 | map["StatType"] = "PercentageStat"; | ||
97 | |||
98 | map.Add("Antecedent", OSD.FromLong(Antecedent)); | ||
99 | map.Add("Consequent", OSD.FromLong(Consequent)); | ||
100 | |||
101 | return map; | ||
102 | } | ||
87 | } | 103 | } |
88 | } \ No newline at end of file | 104 | } \ No newline at end of file |