29 using System.Collections.Generic;
32 using OpenMetaverse.StructuredData;
34 namespace OpenSim.Framework.Monitoring
38 public long Antecedent {
get; set; }
39 public long Consequent {
get; set; }
41 public override double Value
57 return (
double)Antecedent / c * 100;
62 throw new InvalidOperationException(
"Cannot set value on a PercentageStat");
73 Action<Stat> pullAction,
75 : base(shortName, name, description,
"%", category, container, type, pullAction, verbosity) {}
79 StringBuilder sb =
new StringBuilder();
82 "{0}.{1}.{2} : {3:0.##}{4} ({5}/{6})",
83 Category, Container, ShortName, Value, UnitName, Antecedent, Consequent);
85 AppendMeasuresOfInterest(sb);
94 OSDMap map = base.ToOSDMap();
96 map[
"StatType"] =
"PercentageStat";
98 map.Add(
"Antecedent", OSD.FromLong(Antecedent));
99 map.Add(
"Consequent", OSD.FromLong(Consequent));
override string ToConsoleString()
OpenMetaverse.StructuredData.OSDMap OSDMap
Holds individual statistic details
override OSDMap ToOSDMap()
PercentageStat(string shortName, string name, string description, string category, string container, StatType type, Action< Stat > pullAction, StatVerbosity verbosity)
StatVerbosity
Verbosity of stat.