コード例 #1
0
ファイル: DoubleCounter.cs プロジェクト: Elders/Servo.NET
        /**
         * Creates a new instance of the counter.
         */
        internal DoubleCounter(MonitorConfig config, Clock clock)
            : base(config.withAdditionalTag(DataSourceType.NORMALIZED))
        {
            // This class will reset the value so it is not a monotonically increasing value as
            // expected for type=COUNTER. This class looks like a counter to the user and a gauge to
            // the publishing pipeline receiving the value.

            count = new StepLong(0L, clock);
        }
コード例 #2
0
 /**
  * Creates a new instance of the gauge using a specific clock. Useful for unit testing.
  */
 internal MaxGauge(MonitorConfig config, Clock clock)
     : base(config.withAdditionalTag(DataSourceType.GAUGE))
 {
     max = new StepLong(0L, clock);
 }