public void WriteQueryMetrics(QueryMetrics queryMetrics) { this.WriteBeforeQueryMetrics(); // Top Level Properties this.WriteRetrievedDocumentCount(queryMetrics.BackendMetrics.RetrievedDocumentCount); this.WriteRetrievedDocumentSize(queryMetrics.BackendMetrics.RetrievedDocumentSize); this.WriteOutputDocumentCount(queryMetrics.BackendMetrics.OutputDocumentCount); this.WriteOutputDocumentSize(queryMetrics.BackendMetrics.OutputDocumentSize); this.WriteIndexHitRatio(queryMetrics.BackendMetrics.IndexHitRatio); this.WriteTotalQueryExecutionTime(queryMetrics.BackendMetrics.TotalTime); // QueryPreparationTimes this.WriteQueryPreparationTimes(queryMetrics.BackendMetrics.QueryPreparationTimes); this.WriteIndexLookupTime(queryMetrics.BackendMetrics.IndexLookupTime); this.WriteDocumentLoadTime(queryMetrics.BackendMetrics.DocumentLoadTime); this.WriteVMExecutionTime(queryMetrics.BackendMetrics.VMExecutionTime); // RuntimesExecutionTimes this.WriteRuntimesExecutionTimes(queryMetrics.BackendMetrics.RuntimeExecutionTimes); this.WriteDocumentWriteTime(queryMetrics.BackendMetrics.DocumentWriteTime); // ClientSideMetrics this.WriteClientSideMetrics(queryMetrics.ClientSideMetrics); // IndexUtilizationInfo this.WriteBeforeIndexUtilizationInfo(); this.WriteIndexUtilizationInfo(queryMetrics.IndexUtilizationInfo); this.WriteAfterQueryMetrics(); }
public Accumulator Accumulate(QueryMetrics queryMetrics) { if (queryMetrics == null) { throw new ArgumentNullException(nameof(queryMetrics)); } return(new Accumulator( backendMetricsAccumulator: this.BackendMetricsAccumulator.Accumulate(queryMetrics.BackendMetrics), indexUtilizationInfoAccumulator: this.IndexUtilizationInfoAccumulator.Accumulate(queryMetrics.IndexUtilizationInfo), clientSideMetricsAccumulator: this.ClientSideMetricsAccumulator.Accumulate(queryMetrics.ClientSideMetrics))); }