< Summary

Information
Class: SwiftCollections.Query.QueryTraversalScratch
Assembly: SwiftCollections
File(s): /home/runner/work/SwiftCollections/SwiftCollections/src/SwiftCollections/Query/Shared/QueryTraversalScratch.cs
Line coverage
100%
Covered lines: 7
Uncovered lines: 0
Coverable lines: 7
Total lines: 21
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%11100%
RentIntStack(...)100%11100%

File(s)

/home/runner/work/SwiftCollections/SwiftCollections/src/SwiftCollections/Query/Shared/QueryTraversalScratch.cs

#LineLine coverage
 1using System.Threading;
 2
 3namespace SwiftCollections.Query;
 4
 5internal sealed class QueryTraversalScratch
 6{
 7    private readonly ThreadLocal<SwiftIntStack> _intStack;
 8
 389    public QueryTraversalScratch()
 10    {
 6111        _intStack = new ThreadLocal<SwiftIntStack>(() => new SwiftIntStack(0));
 3812    }
 13
 14    public SwiftIntStack RentIntStack(int capacity)
 15    {
 2416        SwiftIntStack stack = _intStack.Value!;
 2417        stack.EnsureCapacity(capacity);
 2418        stack.Clear();
 2419        return stack;
 20    }
 21}

Methods/Properties

.ctor()
RentIntStack(System.Int32)