示例#1
0
 public virtual void GetMetrics(MetricsCollector collector, bool all)
 {
     lock (this)
     {
         registry.Snapshot(collector.AddRecord(registry.Info()), all);
     }
 }
示例#2
0
 public virtual void GetMetrics(MetricsCollector builder, bool all)
 {
     lock (this)
     {
         MetricsRecordBuilder rb = builder.AddRecord(MsName).AddGauge(MsInfo.NumActiveSources
                                                                      , sources.Count).AddGauge(MsInfo.NumAllSources, allSources.Count).AddGauge(MsInfo
                                                                                                                                                 .NumActiveSinks, sinks.Count).AddGauge(MsInfo.NumAllSinks, allSinks.Count);
         foreach (MetricsSinkAdapter sa in sinks.Values)
         {
             sa.Snapshot(rb, all);
         }
         registry.Snapshot(rb, all);
     }
 }
示例#3
0
 public virtual void GetMetrics(MetricsCollector collector, bool all)
 {
     UpdateRunningTime();
     registry.Snapshot(collector.AddRecord(registry.Info()), all);
 }