public TimeInterval(ProfilerTarget target, TimeSpan elapsed, int threadId) : this() { Target = target; Elapsed = elapsed; ThreadId = threadId; }
private static string BuildCore(IEnumerable<TimeInterval> timeIntervals, ProfilerTarget target) { return timeIntervals.Where(x => x.Target == target) .GroupBy(x => x.ThreadId) .OrderBy(x => x.Key == Thread.CurrentThread.ManagedThreadId ? 0 : 1) .Select(x => x.Sum(t => (int) t.Elapsed.TotalMilliseconds)) .ToList() .ToString(";"); }
private static string BuildCore(IEnumerable <TimeInterval> timeIntervals, ProfilerTarget target) { return(timeIntervals.Where(x => x.Target == target) .GroupBy(x => x.ThreadId) .OrderBy(x => x.Key == Thread.CurrentThread.ManagedThreadId ? 0 : 1) .Select(x => x.Sum(t => (int)t.Elapsed.TotalMilliseconds)) .ToList() .ToString(";")); }
public IDisposable Start(ProfilerTarget target) { var stopWatch = Stopwatch.StartNew(); return Disposable.Create(() => _data.Push(new TimeInterval(target, stopWatch.Elapsed, Thread.CurrentThread.ManagedThreadId))); }
public Maybe<TpProfilerStatisticRecord> this[ProfilerTarget target] => _data.GetValue(target);
public Maybe <TpProfilerStatisticRecord> this[ProfilerTarget target] { get { return(_data.GetValue(target)); } }
public Maybe<TpProfilerStatisticRecord> this[ProfilerTarget target] { get { return _data.GetValue(target); } }
public IDisposable Start(ProfilerTarget target) { var stopWatch = Stopwatch.StartNew(); return(Disposable.Create(() => _data.Push(new TimeInterval(target, stopWatch.Elapsed, Thread.CurrentThread.ManagedThreadId)))); }