コード例 #1
0
        public FanoutMetric GetMetric(string key)
        {
            FanoutMetric metric;

            if (!metrics.TryGetValue(key, out metric))
            {
                metric = new FanoutMetric();
                lock (this)
                {
                    listeners.Each(l => metric.AddFanout(l.Key.GetMetric(key)));
                }
                metric = metrics.AddOrUpdate(key, metric, (k, m) => metric);
            }
            return(metric);
        }
コード例 #2
0
 private static FanoutMetric AddFanout(FanoutMetric metric, long i)
 {
     metric.Add(i);
     return(metric);
 }