Count visible incidents at or above a selected severity threshold.

incident queue Filtering incidents by severity keeps the report focused on the queue entries that need immediate operator attention.

Incident Queue Reliability Report

minimumSeverity
IncidentQueueReliabilityReport.cs
Replay: real traced execution (multi-file project)
using System;

class Program
{
    static void Main()
    {
        int minimumSeverity = 2;
        int[] severities = { 1, 2, 3, 3 };
        int visible = 0;
        int high = 0;

        foreach (int severity in severities)
        {
            if (severity >= minimumSeverity)
            {
                visible++;
            }

            if (severity >= 3)
            {
                high++;
            }
        }

        Console.WriteLine("minimum=" + minimumSeverity);
        Console.WriteLine("visible=" + visible);
        Console.WriteLine("high=" + high);
    }
}
using System;

class Program
{
    static void Main()
    {
        int minimumSeverity = 1;
        int[] severities = { 1, 2, 3, 3 };
        int visible = 0;
        int high = 0;

        foreach (int severity in severities)
        {
            if (severity >= minimumSeverity)
            {
                visible++;
            }

            if (severity >= 3)
            {
                high++;
            }
        }

        Console.WriteLine("minimum=" + minimumSeverity);
        Console.WriteLine("visible=" + visible);
        Console.WriteLine("high=" + high);
    }
}
using System;

class Program
{
    static void Main()
    {
        int minimumSeverity = 3;
        int[] severities = { 1, 2, 3, 3 };
        int visible = 0;
        int high = 0;

        foreach (int severity in severities)
        {
            if (severity >= minimumSeverity)
            {
                visible++;
            }

            if (severity >= 3)
            {
                high++;
            }
        }

        Console.WriteLine("minimum=" + minimumSeverity);
        Console.WriteLine("visible=" + visible);
        Console.WriteLine("high=" + high);
    }
}
  1. minimumSeverity ← 2, visible ← 0, high ← 0

    4{5    static void Main()6    {7        int minimumSeverity→ 2 = 2; //@minimumSeverity=1, 38        int[] severities = { 1, 2, 3, 3 };9        int visible→ 0 = 0;10        int high→ 0 = 0;
  2. foreach (int severity in severities)

    pass 1 of 4
    12foreach (int severity1 in severities)13{14    if (severity >= minimumSeverity)
    All 4 passes — pass 1 is the card above
    passseverityhigh
    11
    22
    330 1
    431 2
  3. visible ← 1

    pass 1 of 3
    13{14    if (severity2 >= minimumSeverity2)15    {16        visible→ 1++;17    }
    All 3 passes — pass 1 is the card above
    passseverityvisiblehigh
    120 1
    231 20 1
    332 31 2
  4. high ← 1

    pass 1 of 2
    19if (severity3 >= 3)20{21    high→ 1++;22}
  5. high ← 2

    pass 2 of 2
    19if (severity3 >= 3)20{21    high→ 2++;22}
  6. Console.WriteLine("minimum=" + minimumSeverity);

    25    Console.WriteLine("minimum=" + minimumSeverity2);26    Console.WriteLine("visible=" + visible3);27    Console.WriteLine("high=" + high2);28}
    outputminimum=2
    visible=3
    high=2
  1. minimumSeverity ← 1, visible ← 0, high ← 0

    4{5    static void Main()6    {7        int minimumSeverity→ 1 = 1;8        int[] severities = { 1, 2, 3, 3 };9        int visible→ 0 = 0;10        int high→ 0 = 0;
  2. foreach (int severity in severities)

    pass 1 of 4
    12foreach (int severity1 in severities)13{14    if (severity >= minimumSeverity)
    All 4 passes — pass 1 is the card above
    passseverityhigh
    11
    22
    330 1
    431 2
  3. visible ← 1

    pass 1 of 4
    13{14    if (severity1 >= minimumSeverity1)15    {16        visible→ 1++;17    }
    All 4 passes — pass 1 is the card above
    passseverityvisiblehigh
    110 1
    221 2
    332 30 1
    433 41 2
  4. high ← 1

    pass 1 of 2
    19if (severity3 >= 3)20{21    high→ 1++;22}
  5. high ← 2

    pass 2 of 2
    19if (severity3 >= 3)20{21    high→ 2++;22}
  6. Console.WriteLine("minimum=" + minimumSeverity);

    25    Console.WriteLine("minimum=" + minimumSeverity1);26    Console.WriteLine("visible=" + visible4);27    Console.WriteLine("high=" + high2);28}
    outputminimum=1
    visible=4
    high=2
  1. minimumSeverity ← 3, visible ← 0, high ← 0

    4{5    static void Main()6    {7        int minimumSeverity→ 3 = 3;8        int[] severities = { 1, 2, 3, 3 };9        int visible→ 0 = 0;10        int high→ 0 = 0;
  2. foreach (int severity in severities)

    pass 1 of 4
    12foreach (int severity1 in severities)13{14    if (severity >= minimumSeverity)
    All 4 passes — pass 1 is the card above
    passseverityminimumSeverityvisiblehigh
    11
    22
    3330 10 1
    4331 21 2
  3. visible ← 1

    pass 1 of 2
    13{14    if (severity3 >= minimumSeverity3)15    {16        visible→ 1++;17    }
  4. high ← 1

    pass 1 of 2
    19if (severity3 >= 3)20{21    high→ 1++;22}
  5. visible ← 2

    pass 2 of 2
    13{14    if (severity3 >= minimumSeverity3)15    {16        visible→ 2++;17    }
  6. high ← 2

    pass 2 of 2
    19if (severity3 >= 3)20{21    high→ 2++;22}
  7. Console.WriteLine("minimum=" + minimumSeverity);

    25    Console.WriteLine("minimum=" + minimumSeverity3);26    Console.WriteLine("visible=" + visible2);27    Console.WriteLine("high=" + high2);28}
    outputminimum=3
    visible=2
    high=2