public void Complete(long trivialThreshold, ReportProfileData reportProfileData) { var completeTicks = Stopwatch.GetTimestamp() - _stopwatchTicks; var milliseconds = completeTicks * 1000 / Stopwatch.Frequency; if (milliseconds > trivialThreshold) { reportProfileData(new Report(_timingId, _startTime, TimeSpan.FromMilliseconds(milliseconds))); } }
public static void UseProfile <T>(this IPipeConfigurator <T> configurator, ReportProfileData <T> reportProfileData) where T : class, PipeContext { if (configurator == null) { throw new ArgumentNullException(nameof(configurator)); } if (reportProfileData == null) { throw new ArgumentNullException(nameof(reportProfileData)); } var specification = new ProfilePipeSpecification <T>(reportProfileData, 0); configurator.AddPipeSpecification(specification); }
public ProfilePipeSpecification(ReportProfileData <T> reportProfileData, long trivialThreshold) { _reportProfileData = reportProfileData; _trivialThreshold = trivialThreshold; }
public ProfileFilter(ReportProfileData reportProfileData, long trivialThreshold) { _reportProfileData = reportProfileData; _trivialThreshold = trivialThreshold; }