Пример #1
0
        public PerfRecord Subject(string type, string subject, long allowableRuntimeInMilliseconds)
        {
            var record = new PerfRecord(type, subject, _stopwatch.ElapsedMilliseconds, allowableRuntimeInMilliseconds);

            _records.Add(record);

            return(record);
        }
Пример #2
0
        public IDisposable Subject(string type, string subject)
        {
            var record = new PerfRecord(type, subject, _stopwatch.ElapsedMilliseconds);

            _records.Add(record);

            return(new Marker(record, _stopwatch));
        }
Пример #3
0
        public void End(PerfRecord record, IResultMessage result = null)
        {
            if (record == null)
            {
                throw new ArgumentNullException(nameof(record));
            }

            record.MarkEnd(_stopwatch.ElapsedMilliseconds);

            result?.MarkPerformance(record);
        }
Пример #4
0
 public void Start(Specification spec)
 {
     _main = new PerfRecord("Specification", spec.name, 0, 0);
     _records.Add(_main);
     _stopwatch.Start();
 }
Пример #5
0
 public PerfRecordTracking(Timings parent, PerfRecord record)
 {
     _parent = parent;
     _record = record;
 }
Пример #6
0
 public Marker(PerfRecord record, Stopwatch stopwatch)
 {
     _record = record;
     _stopwatch = stopwatch;
 }
Пример #7
0
        public IDisposable Subject(string type, string subject)
        {
            var record = new PerfRecord(type, subject, _stopwatch.ElapsedMilliseconds);
            _records.Add(record);

            return new Marker(record, _stopwatch);
        }
Пример #8
0
 public void Start(Specification spec)
 {
     _main = new PerfRecord("Specification", spec.name, 0);
     _records.Add(_main);
     _stopwatch.Start();
 }
Пример #9
0
 public Marker(PerfRecord record, Stopwatch stopwatch)
 {
     _record    = record;
     _stopwatch = stopwatch;
 }