Beispiel #1
0
        public void GetDuration_returns_time_in_microseconds()
        {
            var start = TickClock.Start();

            Thread.Sleep(100);

            var duration = TickClock.GetDuration(start);

            duration.Should().BeInRange(100000, 105000);
        }
        public static void UndoApply(TraceInfo capturedContext)
        {
            if (capturedContext.span != null)
            {
                PopSpan();

                capturedContext.span.DurationInMicroseconds = TickClock.GetDuration(capturedContext.span.DurationInMicroseconds.Value);

                ZipkinConfig.Record(capturedContext.span);
            }
        }
Beispiel #3
0
        public void Dispose()
        {
            if (Span != null)
            {
                Span.DurationInMicroseconds = TickClock.GetDuration(_start);

                TraceContextPropagation.PopSpan();

                ZipkinConfig.Record(Span);

                Span = null;
            }
        }