private void WritePartitionSchedulingTimeSpan(string partitionId, SchedulingTimeSpan schedulingTimeSpan)
        {
            this.WriteBeforePartitionSchedulingTimeSpan();

            this.WritePartitionSchedulingTimeSpanId(partitionId);
            this.WriteResponseTime(schedulingTimeSpan.ResponseTime);
            this.WriteRunTime(schedulingTimeSpan.RunTime);
            this.WriteWaitTime(schedulingTimeSpan.WaitTime);
            this.WriteTurnaroundTime(schedulingTimeSpan.TurnaroundTime);
            this.WriteNumberOfPreemptions(schedulingTimeSpan.NumPreemptions);

            this.WriteAfterPartitionSchedulingTimeSpan();
        }
Пример #2
0
        private void WriteSchedulingMetrics(ClientSideMetrics clientSideMetrics)
        {
            this.WriteBeforeSchedulingMetrics();

            foreach (Tuple <string, SchedulingTimeSpan> partitionSchedulingTimeSpan in clientSideMetrics.PartitionSchedulingTimeSpans.OrderBy(x => x.Item2.ResponseTime))
            {
                string             partitionId        = partitionSchedulingTimeSpan.Item1;
                SchedulingTimeSpan schedulingTimeSpan = partitionSchedulingTimeSpan.Item2;

                this.WritePartitionSchedulingTimeSpan(partitionId, schedulingTimeSpan);
            }

            this.WriteAfterSchedulingMetrics();
        }
 /// <summary>
 /// Gets the average response time for a list of SchedulingMetrics.
 /// </summary>
 /// <param name="schedulingTimeSpans">Metrics to get average response times from.</param>
 /// <returns>The average response time for a list of SchedulingMetrics.</returns>
 public static TimeSpan GetAverageResponseTime(IEnumerable <SchedulingTimeSpan> schedulingTimeSpans)
 {
     return(SchedulingTimeSpan.GetAverageTime(
                schedulingTimeSpans,
                schedulingMetric => schedulingMetric.ResponseTime.Ticks));
 }