< Summary - Kestrun — Combined Coverage

Information
Class: Kestrun.Tasks.KrTask
Assembly: Kestrun
File(s): /home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/Tasks/KrTask.cs
Tag: Kestrun/Kestrun@2d87023b37eb91155071c91dd3d6a2eeb3004705
Line coverage
40%
Covered lines: 6
Uncovered lines: 9
Coverable lines: 15
Total lines: 38
Line coverage: 40%
Branch coverage
0%
Covered branches: 0
Total branches: 4
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 10/15/2025 - 01:01:18 Line coverage: 40% (6/15) Branch coverage: 0% (0/4) Total lines: 38 Tag: Kestrun/Kestrun@7c4ce528870211ad6c2d2398c31ec13097fc5840 10/15/2025 - 01:01:18 Line coverage: 40% (6/15) Branch coverage: 0% (0/4) Total lines: 38 Tag: Kestrun/Kestrun@7c4ce528870211ad6c2d2398c31ec13097fc5840

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
get_Id()100%11100%
get_Name()100%11100%
get_Description()100%11100%
get_State()100%210%
get_StartedAt()100%210%
get_CompletedAt()100%210%
get_Progress()100%11100%
get_ParentId()100%210%
get_ChildrenId()100%210%
get_StateText()100%210%
get_Duration()0%2040%

File(s)

/home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/Tasks/KrTask.cs

#LineLine coverage
 1namespace Kestrun.Tasks;
 2
 3/// <summary>
 4/// Basic information about a task for listing purposes.
 5/// </summary>
 6/// <param name="Id">Unique task identifier.</param>
 7/// <param name="Name">Optional human-friendly name of the task.</param>
 8/// <param name="Description">Optional description of the task.</param>
 9/// <param name="State">Final state of the task when the result was captured.</param>
 10/// <param name="StartedAt">UTC timestamp when execution started.</param>
 11/// <param name="CompletedAt">UTC timestamp when execution ended.</param>
 12/// <param name="Progress">Optional progress state of the task.</param>
 13/// <param name="ParentId">Optional identifier of the parent task, if any.</param>
 14/// <param name="ChildrenId">Identifiers of any child tasks spawned by this task.</param>
 715public record KrTask(
 516    string Id,
 217    string Name,
 218    string Description,
 019    TaskState State,
 020    DateTimeOffset? StartedAt,
 021    DateTimeOffset? CompletedAt,
 622    ProgressiveKestrunTaskState? Progress,
 023    string ParentId,
 024    string[] ChildrenId
 725)
 26{
 27    /// <summary>
 28    /// The textual name of <see cref="State"/> for display and serialization convenience.
 29    /// </summary>
 030    public string StateText => State.ToString();
 31
 32    /// <summary>
 33    /// Duration of the execution, if both timestamps are available.
 34    /// </summary>
 035    public TimeSpan? Duration => (StartedAt.HasValue && CompletedAt.HasValue)
 036        ? CompletedAt.Value - StartedAt.Value
 037        : null;
 38}