public PerformanceCommand(ref PerformanceEntryAddresses performanceEntryAddresses, Type performanceType, int nodeId) { Enabled = true; PerformanceEntryAddresses = performanceEntryAddresses; PerformanceType = performanceType; NodeId = nodeId; }
/// <summary> /// Generate a new <see cref="PerformanceCommand"/>. /// </summary> /// <param name="performanceEntryAddresses">The <see cref="PerformanceEntryAddresses"/>.</param> /// <param name="type">The performance operation to perform.</param> /// <param name="nodeId">The node id associated to this command.</param> public void GeneratePerformance(ref PerformanceEntryAddresses performanceEntryAddresses, PerformanceCommand.Type type, int nodeId) { PerformanceCommand command = new PerformanceCommand(ref performanceEntryAddresses, type, nodeId); command.EstimatedProcessingTime = _commandProcessingTimeEstimator.Estimate(command); AddCommand(command); }
public void Process(CommandList context) { if (PerformanceType == Type.Start) { PerformanceEntryAddresses.SetStartTime(context.GetTimeElapsedSinceDspStartedProcessing()); } else if (PerformanceType == Type.End) { PerformanceEntryAddresses.SetProcessingTime(context.GetTimeElapsedSinceDspStartedProcessing()); PerformanceEntryAddresses.IncrementEntryCount(); } }