Пример #1
0
        /// <summary>
        /// Copies all data to a different writer.
        /// </summary>
        /// <param name="writer"></param>
        /// <param name="progressReport">Used to report the progress of writing all DataSets, returning false tells WriteTo to cancel the process.</param>
        public void WriteTo(IProfilingDataWriter writer, Predicate <double> progressReport)
        {
            writer.ProcessorFrequency = this.processorFrequency;
            writer.WriteMappings(this.nameMappings.Values);
            for (int i = 0; i < this.DataSetCount; i++)
            {
                using (UnmanagedProfilingDataSet dataSet = this.LoadDataSet(i))
                    writer.WriteDataSet(dataSet);

                if (!progressReport.Invoke((i + 1) / (double)this.DataSetCount))
                {
                    break;
                }
            }
        }
        /// <summary>
        /// Copies all data to a different writer.
        /// </summary>
        /// <param name="writer"></param>
        /// <param name="progressReport">Used to report the progress of writing all DataSets, returning false tells WriteTo to cancel the process.</param>
        public void WriteTo(IProfilingDataWriter writer, Predicate <double> progressReport)
        {
            writer.ProcessorFrequency = processorFrequency;
            writer.WriteMappings(nameMappings.Values);
            writer.WritePerformanceCounterData(counters);
            writer.WriteEventData(events);

            for (int i = 0; i < DataSetCount; i++)
            {
                using (UnmanagedProfilingDataSet dataSet = LoadDataSet(i))
                    writer.WriteDataSet(dataSet);

                if (!progressReport.Invoke((i + 1) / (double)DataSetCount))
                {
                    break;
                }
            }
        }
		/// <summary>
		/// Copies all data to a different writer.
		/// </summary>
		/// <param name="writer"></param>
		/// <param name="progressReport">Used to report the progress of writing all DataSets, returning false tells WriteTo to cancel the process.</param>
		public void WriteTo(IProfilingDataWriter writer, Predicate<double> progressReport)
		{
			writer.ProcessorFrequency = this.processorFrequency;
			writer.WriteMappings(this.nameMappings.Values);
			for (int i = 0; i < this.DataSetCount; i++) {
				using (UnmanagedProfilingDataSet dataSet = this.LoadDataSet(i))
					writer.WriteDataSet(dataSet);
				
				if (!progressReport.Invoke((i + 1) / (double)this.DataSetCount))
					break;
			}
		}
Пример #4
0
		/// <summary>
		/// Copies all data to a different writer.
		/// </summary>
		/// <param name="writer"></param>
		/// <param name="progressReport">Used to report the progress of writing all DataSets, returning false tells WriteTo to cancel the process.</param>
		public void WriteTo(IProfilingDataWriter writer, Predicate<double> progressReport)
		{
			writer.ProcessorFrequency = processorFrequency;
			writer.WriteMappings(nameMappings.Values);
			writer.WritePerformanceCounterData(counters);
			writer.WriteEventData(events);
			
			for (int i = 0; i < DataSetCount; i++) {
				using (UnmanagedProfilingDataSet dataSet = LoadDataSet(i))
					writer.WriteDataSet(dataSet);
				
				if (!progressReport.Invoke((i + 1) / (double)DataSetCount))
					break;
			}
		}
 /// <inheritdoc/>
 public void WriteMappings(IEnumerable <NameMapping> mappings)
 {
     targetWriter.WriteMappings(mappings);
 }