コード例 #1
0
 internal void AddDataProcessingTime(TimeMetric childMetric)
 {
     if (m_metricManager != null && childMetric != null)
     {
         m_metricManager[3].Add(childMetric);
     }
 }
コード例 #2
0
 public void Add(TimeMetric otherMetric)
 {
     m_totalDurationMs += otherMetric.TotalDurationMs;
     for (int i = 0; i < m_otherMetricAdjustments.Length; i++)
     {
         m_otherMetricAdjustments[i] += otherMetric.m_otherMetricAdjustments[i];
     }
 }
コード例 #3
0
 public void Subtract(TimeMetric other)
 {
     m_totalDurationMs = ExecutionLogContext.TimerMeasurementAdjusted(m_totalDurationMs - other.m_totalDurationMs);
     for (int i = 0; i < m_otherMetricAdjustments.Length; i++)
     {
         long durationMs = m_otherMetricAdjustments[i] - other.m_otherMetricAdjustments[i];
         m_otherMetricAdjustments[i] = ExecutionLogContext.TimerMeasurementAdjusted(durationMs);
     }
 }
コード例 #4
0
 public TimeMetric(TimeMetric other)
 {
     m_indexInCollection      = other.m_indexInCollection;
     m_timer                  = new Timer();
     m_totalDurationMs        = other.m_totalDurationMs;
     m_isRunning              = false;
     m_otherMetricAdjustments = (long[])other.m_otherMetricAdjustments.Clone();
     m_metricAdjuster         = other.m_metricAdjuster;
 }
コード例 #5
0
 private void InitializeFromExistingQuery(ExecutedQuery query)
 {
     query.ReleaseOwnership(ref m_connection);
     m_needToCloseConnection = true;
     MergeAutoCollationSettings(m_connection);
     m_executionMetrics.Add(DataProcessingMetrics.MetricType.OpenConnection, query.ExecutionMetrics.OpenConnectionDurationMs);
     m_executionMetrics.ConnectionFromPool = query.ExecutionMetrics.ConnectionFromPool;
     m_totalDurationFromExistingQuery      = new TimeMetric(query.ExecutionMetrics.TotalDuration);
 }
コード例 #6
0
 public void StopAllRunningTimers()
 {
     for (int num = m_timeMetrics.Length - 1; num >= 0; num--)
     {
         TimeMetric timeMetric = m_timeMetrics[num];
         if (timeMetric.IsRunning)
         {
             timeMetric.StopTimer();
         }
     }
 }
コード例 #7
0
 internal DataProcessingMetrics(IJobContext jobContext, ExecutionLogContext executionLogContext)
 {
     m_jobContext = jobContext;
     if (jobContext != null)
     {
         m_timers          = new Timer[6];
         m_totalTimeMetric = executionLogContext.CreateDataRetrievalWorkerTimer();
     }
     else
     {
         m_timers = null;
     }
 }
コード例 #8
0
        public long GetNormalizedAdjustedMetric(int targetIndex)
        {
            long num = m_timeMetrics[targetIndex].TotalDurationMs;

            for (int i = 0; i < m_timeMetrics.Length; i++)
            {
                if (i != targetIndex)
                {
                    TimeMetric timeMetric = m_timeMetrics[i];
                    num -= timeMetric.OtherMetricAdjustments[targetIndex];
                }
            }
            return(ExecutionLogContext.NormalizeCalculatedDuration(num));
        }
コード例 #9
0
 protected override void FinalCleanup()
 {
     base.FinalCleanup();
     if (RuntimeDataSet != null)
     {
         TimeMetric timeMetric = RuntimeDataSet.DataSetExecutionMetrics.TotalDuration;
         if (m_totalDurationFromExistingQuery != null)
         {
             timeMetric = new TimeMetric(timeMetric);
             timeMetric.Subtract(m_totalDurationFromExistingQuery);
         }
         m_odpContext.ExecutionLogContext.AddDataProcessingTime(timeMetric);
         m_executionMetrics.Add(RuntimeDataSet.DataSetExecutionMetrics);
     }
 }