< Summary

Information
Class: Intentum.Runtime.Resilience.Degradation.DegradationOptions
Assembly: Intentum.Runtime
File(s): /home/runner/work/Intentum/Intentum/src/Intentum.Runtime/Resilience/Degradation/IDegradationPolicy.cs
Line coverage
85%
Covered lines: 6
Uncovered lines: 1
Coverable lines: 7
Total lines: 18
Line coverage: 85.7%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
.ctor(...)100%22100%

File(s)

/home/runner/work/Intentum/Intentum/src/Intentum.Runtime/Resilience/Degradation/IDegradationPolicy.cs

#LineLine coverage
 1namespace Intentum.Runtime.Resilience.Degradation;
 2
 53public sealed record DegradationOptions(
 174    int DegradationThreshold = 5,
 55    TimeSpan CheckInterval = default,
 06    double DegradedConfidence = 0.3,
 57    string DegradedLevel = "Low")
 8{
 49    public TimeSpan CheckInterval { get; init; } =
 510        CheckInterval == default ? TimeSpan.FromSeconds(10) : CheckInterval;
 11}
 12
 13public interface IDegradationPolicy
 14{
 15    bool IsDegraded { get; }
 16    Task<T> ExecuteAsync<T>(Func<Task<T>> operation, Func<T> degradedFallback);
 17    void Reset();
 18}