private async Task GetIteratorResponse <T>(FeedIterator <T> feedIterator)
        {
            MetricsAccumulator metricsAccumulator = new MetricsAccumulator();

            Documents.ValueStopwatch totalTime    = new Documents.ValueStopwatch();
            Documents.ValueStopwatch getTraceTime = new Documents.ValueStopwatch();
            string diagnosticDataPath             = Path.GetFullPath(DiagnosticsDataFileName);

            while (feedIterator.HasMoreResults)
            {
                totalTime.Start();
                FeedResponse <T> response = await feedIterator.ReadNextAsync();

                getTraceTime.Start();
                if (response.RequestCharge != 0)
                {
                    using (StreamWriter outputFile = new StreamWriter(path: diagnosticDataPath, append: true))
                    {
                        outputFile.WriteLine(response.Diagnostics.ToString());
                    }
                    metricsAccumulator.ReadFromTrace(response, this.queryStatisticsDatumVisitor);
                }

                getTraceTime.Stop();
                totalTime.Stop();
                if (response.RequestCharge != 0)
                {
                    this.queryStatisticsDatumVisitor.AddEndToEndTime(totalTime.ElapsedMilliseconds - getTraceTime.ElapsedMilliseconds);
                    this.queryStatisticsDatumVisitor.PopulateMetrics();
                }
                totalTime.Reset();
                getTraceTime.Reset();
            }
        }