コード例 #1
0
        public Histogram(string name, string unit, long count, double latestValue, double maxValue, double minValue, double avgValue, double stdDevValue,
            double percent75, double percent95, double percent98, double percent99, double percent999, string categoryPrefix)
        {
            this.counter = new Counter(string.Format("{0} Count", name), count, unit, Prefix(counterCategory, categoryPrefix));

            this.gaugeOfLatestValue = new Gauge(string.Format("{0} Last Value", name), latestValue, unit, Prefix(gaugeCategory, categoryPrefix));
            this.gaugeOfMaxValue = new Gauge(string.Format("{0} Max Value", name), maxValue, unit, Prefix(gaugeCategory, categoryPrefix));
            this.gaugeOfAvgValue = new Gauge(string.Format("{0} Avg Value", name), avgValue, unit, Prefix(gaugeCategory, categoryPrefix));
            this.gaugeOfMinValue = new Gauge(string.Format("{0} Min Value", name), minValue, unit, Prefix(gaugeCategory, categoryPrefix));
            this.gaugeOfStdDevValue = new Gauge(string.Format("{0} StdDev Value", name), stdDevValue, unit, Prefix(gaugeCategory, categoryPrefix));

            this.gaugeOfPerecent75 = new Gauge(string.Format("{0} Percentile 75", name), percent75, unit, Prefix(gaugeCategory, categoryPrefix));
            this.gaugeOfPerecent95 = new Gauge(string.Format("{0} Percentile 95", name), percent95, unit, Prefix(gaugeCategory, categoryPrefix));
            this.gaugeOfPerecent98 = new Gauge(string.Format("{0} Percentile 98", name), percent98, unit, Prefix(gaugeCategory, categoryPrefix));
            this.gaugeOfPerecent99 = new Gauge(string.Format("{0} Percentile 99", name), percent99, unit, Prefix(gaugeCategory, categoryPrefix));
            this.gaugeOfPerecent999 = new Gauge(string.Format("{0} Percentile 999", name), percent999, unit, Prefix(gaugeCategory, categoryPrefix));

            this.metrics = new ICanReportToGoogleAnalytics[]
            {
                this.counter,

                this.gaugeOfLatestValue,
                this.gaugeOfMaxValue,
                this.gaugeOfAvgValue,
                this.gaugeOfMinValue,
                this.gaugeOfStdDevValue,

                this.gaugeOfPerecent75,
                this.gaugeOfPerecent95,
                this.gaugeOfPerecent98,
                this.gaugeOfPerecent99,
                this.gaugeOfPerecent999,
            };
        }
コード例 #2
0
 public Meter(string name, string unit, string rateUnit, long count, double rate, string categoryPrefix)
 {
     this.counter = new Counter(string.Format("{0} Count", name), count, unit, Prefix(counterCategory, categoryPrefix));
     this.gaugeOfRate = new Gauge(string.Format("{0} Gauge", name), rate, rateUnit, Prefix(gaugeCategory, categoryPrefix));
     this.metrics = new ICanReportToGoogleAnalytics[]
     {
         this.counter,
         this.gaugeOfRate,
     };
 }