Exemplo n.º 1
0
        protected StatsAggregator(int id, IStatsAggregator lastStats)
        {
            Id = id;

            var now          = SystemTime.UtcNow;
            var currentScope = lastStats?.StatsScope;

            if (currentScope == null)
            {
                StartTime = now;
            }
            else
            {
                var lastCompleted = lastStats.StartTime.Add(currentScope.Duration);

                // due to different precision of DateTimes and Stopwatches we might have current date
                // smaller than completed one of the latest batch
                // let us adjust current start to avoid overlapping on the performance graph

                StartTime = lastCompleted > now ? lastCompleted : now;
            }

            Stats = new TStats();
        }
Exemplo n.º 2
0
 public virtual void Visit(IStatsAggregator aggregation)
 {
 }
		public virtual void Visit(IStatsAggregator aggregation)
		{
		}