public IndexingStatsAggregator(int id, IndexingStatsAggregator lastStats)
        {
            Id = id;

            var now = SystemTime.UtcNow;

            if (lastStats == null)
            {
                StartTime = now;
            }
            else
            {
                var lastCompleted = lastStats.StartTime.Add(lastStats._scope.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 IndexingRunStats();
        }
 public IndexingStatsAggregator(int id, IndexingStatsAggregator lastStats) : base(id, lastStats)
 {
 }