public TraceLink(TraceNode caller, TraceNode callee) { Caller = caller; Callee = callee; _durationStat = new ManualStat("Duration - " + Caller.Name + " TO " + Callee.Name + ""); _durationStat.NumberFormatAction = (value) => value.ToString("#,##0") + "ms"; if (Caller.ExpectedDuration != default(TimeSpan)) _durationStat.ExpectedMaxNumber = (double)Caller.ExpectedDuration.Ticks / (double)TimeSpan.TicksPerMillisecond; }
public ManualStat this[string key] { get { ManualStat counter; if (_stats.TryGetValue(key, out counter) == false) { counter = new ManualStat(key); _stats[key] = counter; } return counter; } }