Пример #1
0
		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;
		}
Пример #2
0
		public ManualStat this[string key]
		{
			get
			{
				ManualStat counter;
				if (_stats.TryGetValue(key, out counter) == false)
				{
					counter = new ManualStat(key);
					_stats[key] = counter;
				}
				return counter;
			}
		}