Beispiel #1
0
 private void ExecuteSequentialDataSets()
 {
     for (int i = 0; i < base.m_runtimeDataSets.Count; i++)
     {
         base.m_odpContext.CheckAndThrowIfAborted();
         RuntimeAtomicDataSet runtimeAtomicDataSet = (RuntimeAtomicDataSet)base.m_runtimeDataSets[i];
         runtimeAtomicDataSet.InitProcessingParams(base.m_connection, base.m_transaction);
         runtimeAtomicDataSet.ProcessConcurrent(null);
         base.m_executionMetrics.Add(runtimeAtomicDataSet.DataSetExecutionMetrics);
     }
 }
Beispiel #2
0
        private void ExecuteParallelDataSets()
        {
            ThreadSet threadSet = new ThreadSet(base.m_runtimeDataSets.Count - 1);

            try
            {
                for (int i = 1; i < base.m_runtimeDataSets.Count; i++)
                {
                    RuntimeAtomicDataSet runtimeAtomicDataSet = (RuntimeAtomicDataSet)base.m_runtimeDataSets[i];
                    runtimeAtomicDataSet.InitProcessingParams(null, base.m_transaction);
                    threadSet.TryQueueWorkItem(base.m_odpContext, runtimeAtomicDataSet.ProcessConcurrent);
                }
                RuntimeAtomicDataSet runtimeAtomicDataSet2 = (RuntimeAtomicDataSet)base.m_runtimeDataSets[0];
                runtimeAtomicDataSet2.InitProcessingParams(base.m_connection, base.m_transaction);
                runtimeAtomicDataSet2.ProcessConcurrent(null);
            }
            catch (Exception e)
            {
                if (base.m_odpContext.AbortInfo != null)
                {
                    base.m_odpContext.AbortInfo.SetError(e, base.m_odpContext.ProcessingAbortItemUniqueIdentifier);
                }
                throw;
            }
            finally
            {
                threadSet.WaitForCompletion();
                threadSet.Dispose();
            }
            if (this.NeedsExecutionLogging && base.m_odpContext.JobContext != null)
            {
                DataProcessingMetrics dataProcessingMetrics = null;
                for (int j = 0; j < base.m_runtimeDataSets.Count; j++)
                {
                    RuntimeDataSet runtimeDataSet = base.m_runtimeDataSets[j];
                    if (dataProcessingMetrics == null || runtimeDataSet.DataSetExecutionMetrics.TotalDurationMs > dataProcessingMetrics.TotalDurationMs)
                    {
                        dataProcessingMetrics = runtimeDataSet.DataSetExecutionMetrics;
                    }
                }
                base.m_executionMetrics.Add(dataProcessingMetrics);
            }
        }