< Summary

Information
Class: NexusLabs.Needlr.AgentFramework.Progress.NullProgressReporter
Assembly: NexusLabs.Needlr.AgentFramework
File(s): /home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework/Progress/NullProgressReporter.cs
Line coverage
100%
Covered lines: 7
Uncovered lines: 0
Coverable lines: 7
Total lines: 37
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
.cctor()100%11100%
get_WorkflowId()100%11100%
get_AgentId()100%11100%
get_Depth()100%11100%
NextSequence()100%11100%
Report(...)100%11100%
CreateChild(...)100%11100%

File(s)

/home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework/Progress/NullProgressReporter.cs

#LineLine coverage
 1namespace NexusLabs.Needlr.AgentFramework.Progress;
 2
 3/// <summary>
 4/// No-op <see cref="IProgressReporter"/> used when no sinks are registered.
 5/// All methods are zero-overhead.
 6/// </summary>
 7[DoNotAutoRegister]
 8internal sealed class NullProgressReporter : IProgressReporter
 9{
 10    private static long _globalSequence;
 11
 12    /// <summary>Singleton instance.</summary>
 113    internal static readonly NullProgressReporter Instance = new();
 14
 15    /// <inheritdoc />
 31616    public string WorkflowId => string.Empty;
 17
 18    /// <inheritdoc />
 10019    public string? AgentId => null;
 20
 21    /// <inheritdoc />
 10022    public int Depth => 0;
 23
 24    /// <inheritdoc />
 25    /// <remarks>
 26    /// Returns real monotonically increasing values even from the null reporter
 27    /// so sequence ordering logic isn't silently broken. <see cref="Report"/> is
 28    /// still a no-op — sequences are generated but events are discarded.
 29    /// </remarks>
 31530    public long NextSequence() => Interlocked.Increment(ref _globalSequence);
 31
 32    /// <inheritdoc />
 31633    public void Report(IProgressEvent progressEvent) { }
 34
 35    /// <inheritdoc />
 136    public IProgressReporter CreateChild(string agentId) => this;
 37}