< Summary

Class:MainScripts.DCL.Helpers.SentryUtils.DisposableTransaction
Assembly:SentryUtils
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Helpers/SentryUtils/DisposableTransaction.cs
Covered lines:2
Uncovered lines:5
Coverable lines:7
Total lines:29
Line coverage:28.5% (2 of 7)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
DisposableTransaction(...)0%110100%
Dispose()0%6200%
SetStatus(...)0%2100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Helpers/SentryUtils/DisposableTransaction.cs

#LineLine coverage
 1using Sentry;
 2using System;
 3
 4namespace MainScripts.DCL.Helpers.SentryUtils
 5{
 6    /// <summary>
 7    /// Finishes `Span` on `Dispose`
 8    /// </summary>
 9    public struct DisposableTransaction : IDisposable
 10    {
 11        private ISpan span;
 12
 13        public DisposableTransaction(ISpan span)
 14        {
 20415            this.span = span;
 20416        }
 17
 18        public void Dispose()
 19        {
 020            span?.Finish();
 021            span = null;
 022        }
 23
 24        public void SetStatus(SpanStatus spanStatus)
 25        {
 026            span.Status = spanStatus;
 027        }
 28    }
 29}