Operational Reliability Reports
Incident Queue Report
Count Visible Tickets
A queue report can scan compact severity values, count tickets at or above a selected threshold, and keep a separate high-severity total.
Program
Play the program to choose the minimum severity and inspect the queue counts.
incident_queue_report.f90
Replay: real traced execution (multi-file project)
program incident_queue_report_demo
implicit none
integer :: severities(4)
integer :: min_severity
integer :: visible_count
integer :: high_count
integer :: i
severities = [1, 3, 2, 3]
min_severity = 2
visible_count = 0
high_count = 0
do i = 1, 4
if (severities(i) >= min_severity) then
visible_count = visible_count + 1
end if
if (severities(i) == 3) then
high_count = high_count + 1
end if
end do
print '(I0, 1X, I0, 1X, I0)', min_severity, visible_count, high_count
end program incident_queue_report_demo
program incident_queue_report_demo
implicit none
integer :: severities(4)
integer :: min_severity
integer :: visible_count
integer :: high_count
integer :: i
severities = [1, 3, 2, 3]
min_severity = 1
visible_count = 0
high_count = 0
do i = 1, 4
if (severities(i) >= min_severity) then
visible_count = visible_count + 1
end if
if (severities(i) == 3) then
high_count = high_count + 1
end if
end do
print '(I0, 1X, I0, 1X, I0)', min_severity, visible_count, high_count
end program incident_queue_report_demo
program incident_queue_report_demo
implicit none
integer :: severities(4)
integer :: min_severity
integer :: visible_count
integer :: high_count
integer :: i
severities = [1, 3, 2, 3]
min_severity = 3
visible_count = 0
high_count = 0
do i = 1, 4
if (severities(i) >= min_severity) then
visible_count = visible_count + 1
end if
if (severities(i) == 3) then
high_count = high_count + 1
end if
end do
print '(I0, 1X, I0, 1X, I0)', min_severity, visible_count, high_count
end program incident_queue_report_demo
severities ← [1, 3, 2, 3]
9severities = [1, 3, 2, 3]10min_severity = 2values this step[1, 3, 2, 3]severitiesmin_severity ← 2
9severities = [1, 3, 2, 3]10min_severity = 211visible_count = 0values this step2min_severityvisible_count ← 0
10min_severity = 211visible_count = 012high_count = 0values this step0visible_counthigh_count ← 0
11visible_count = 012high_count = 013do i = 1, 4values this step0high_counti ← 1
12high_count = 013do i = 1, 414 if (severities(i) >= min_severity) thenvalues this step1iif (severities(i) >= min_severity) then
13do i = 1, 414 if (severities(i) >= min_severity) then15 visible_count = visible_count + 1values this step.false.severities(1) >= min_severityif (severities(i) == 3) then
16end if17if (severities(i) == 3) then18 high_count = high_count + 1values this step.false.severities(1) == 3i ← 2
12high_count = 013do i = 1, 414 if (severities(i) >= min_severity) thenvalues this step2iif (severities(i) >= min_severity) then
13do i = 1, 414 if (severities(i) >= min_severity) then15 visible_count = visible_count + 1values this step.true.severities(2) >= min_severityvisible_count ← 1
14if (severities(i) >= min_severity) then15 visible_count = visible_count + 116end ifvalues this step1visible_countif (severities(i) == 3) then
16end if17if (severities(i) == 3) then18 high_count = high_count + 1values this step.true.severities(2) == 3high_count ← 1
17if (severities(i) == 3) then18 high_count = high_count + 119end ifvalues this step1high_counti ← 3
12high_count = 013do i = 1, 414 if (severities(i) >= min_severity) thenvalues this step3iif (severities(i) >= min_severity) then
13do i = 1, 414 if (severities(i) >= min_severity) then15 visible_count = visible_count + 1values this step.true.severities(3) >= min_severityvisible_count ← 2
14if (severities(i) >= min_severity) then15 visible_count = visible_count + 116end ifvalues this step2visible_countif (severities(i) == 3) then
16end if17if (severities(i) == 3) then18 high_count = high_count + 1values this step.false.severities(3) == 3i ← 4
12high_count = 013do i = 1, 414 if (severities(i) >= min_severity) thenvalues this step4iif (severities(i) >= min_severity) then
13do i = 1, 414 if (severities(i) >= min_severity) then15 visible_count = visible_count + 1values this step.true.severities(4) >= min_severityvisible_count ← 3
14if (severities(i) >= min_severity) then15 visible_count = visible_count + 116end ifvalues this step3visible_countif (severities(i) == 3) then
16end if17if (severities(i) == 3) then18 high_count = high_count + 1values this step.true.severities(4) == 3high_count ← 2
17if (severities(i) == 3) then18 high_count = high_count + 119end ifvalues this step2high_countprint '(I0, 1X, I0, 1X, I0)', min_severity, visible_count, high_count
20 end do21 print '(I0, 1X, I0, 1X, I0)', min_severity, visible_count, high_count22end program incident_queue_report_demooutput2 3 2values this step2min_severity3visible_count2high_count
severities ← [1, 3, 2, 3]
9severities = [1, 3, 2, 3]10min_severity = 1values this step[1, 3, 2, 3]severitiesmin_severity ← 1
9severities = [1, 3, 2, 3]10min_severity = 111visible_count = 0values this step1min_severityvisible_count ← 0
10min_severity = 111visible_count = 012high_count = 0values this step0visible_counthigh_count ← 0
11visible_count = 012high_count = 013do i = 1, 4values this step0high_counti ← 1
12high_count = 013do i = 1, 414 if (severities(i) >= min_severity) thenvalues this step1iif (severities(i) >= min_severity) then
13do i = 1, 414 if (severities(i) >= min_severity) then15 visible_count = visible_count + 1values this step.true.severities(1) >= min_severityvisible_count ← 1
14if (severities(i) >= min_severity) then15 visible_count = visible_count + 116end ifvalues this step1visible_countif (severities(i) == 3) then
16end if17if (severities(i) == 3) then18 high_count = high_count + 1values this step.false.severities(1) == 3i ← 2
12high_count = 013do i = 1, 414 if (severities(i) >= min_severity) thenvalues this step2iif (severities(i) >= min_severity) then
13do i = 1, 414 if (severities(i) >= min_severity) then15 visible_count = visible_count + 1values this step.true.severities(2) >= min_severityvisible_count ← 2
14if (severities(i) >= min_severity) then15 visible_count = visible_count + 116end ifvalues this step2visible_countif (severities(i) == 3) then
16end if17if (severities(i) == 3) then18 high_count = high_count + 1values this step.true.severities(2) == 3high_count ← 1
17if (severities(i) == 3) then18 high_count = high_count + 119end ifvalues this step1high_counti ← 3
12high_count = 013do i = 1, 414 if (severities(i) >= min_severity) thenvalues this step3iif (severities(i) >= min_severity) then
13do i = 1, 414 if (severities(i) >= min_severity) then15 visible_count = visible_count + 1values this step.true.severities(3) >= min_severityvisible_count ← 3
14if (severities(i) >= min_severity) then15 visible_count = visible_count + 116end ifvalues this step3visible_countif (severities(i) == 3) then
16end if17if (severities(i) == 3) then18 high_count = high_count + 1values this step.false.severities(3) == 3i ← 4
12high_count = 013do i = 1, 414 if (severities(i) >= min_severity) thenvalues this step4iif (severities(i) >= min_severity) then
13do i = 1, 414 if (severities(i) >= min_severity) then15 visible_count = visible_count + 1values this step.true.severities(4) >= min_severityvisible_count ← 4
14if (severities(i) >= min_severity) then15 visible_count = visible_count + 116end ifvalues this step4visible_countif (severities(i) == 3) then
16end if17if (severities(i) == 3) then18 high_count = high_count + 1values this step.true.severities(4) == 3high_count ← 2
17if (severities(i) == 3) then18 high_count = high_count + 119end ifvalues this step2high_countprint '(I0, 1X, I0, 1X, I0)', min_severity, visible_count, high_count
20 end do21 print '(I0, 1X, I0, 1X, I0)', min_severity, visible_count, high_count22end program incident_queue_report_demooutput1 4 2values this step1min_severity4visible_count2high_count
severities ← [1, 3, 2, 3]
9severities = [1, 3, 2, 3]10min_severity = 3values this step[1, 3, 2, 3]severitiesmin_severity ← 3
9severities = [1, 3, 2, 3]10min_severity = 311visible_count = 0values this step3min_severityvisible_count ← 0
10min_severity = 311visible_count = 012high_count = 0values this step0visible_counthigh_count ← 0
11visible_count = 012high_count = 013do i = 1, 4values this step0high_counti ← 1
12high_count = 013do i = 1, 414 if (severities(i) >= min_severity) thenvalues this step1iif (severities(i) >= min_severity) then
13do i = 1, 414 if (severities(i) >= min_severity) then15 visible_count = visible_count + 1values this step.false.severities(1) >= min_severityif (severities(i) == 3) then
16end if17if (severities(i) == 3) then18 high_count = high_count + 1values this step.false.severities(1) == 3i ← 2
12high_count = 013do i = 1, 414 if (severities(i) >= min_severity) thenvalues this step2iif (severities(i) >= min_severity) then
13do i = 1, 414 if (severities(i) >= min_severity) then15 visible_count = visible_count + 1values this step.true.severities(2) >= min_severityvisible_count ← 1
14if (severities(i) >= min_severity) then15 visible_count = visible_count + 116end ifvalues this step1visible_countif (severities(i) == 3) then
16end if17if (severities(i) == 3) then18 high_count = high_count + 1values this step.true.severities(2) == 3high_count ← 1
17if (severities(i) == 3) then18 high_count = high_count + 119end ifvalues this step1high_counti ← 3
12high_count = 013do i = 1, 414 if (severities(i) >= min_severity) thenvalues this step3iif (severities(i) >= min_severity) then
13do i = 1, 414 if (severities(i) >= min_severity) then15 visible_count = visible_count + 1values this step.false.severities(3) >= min_severityif (severities(i) == 3) then
16end if17if (severities(i) == 3) then18 high_count = high_count + 1values this step.false.severities(3) == 3i ← 4
12high_count = 013do i = 1, 414 if (severities(i) >= min_severity) thenvalues this step4iif (severities(i) >= min_severity) then
13do i = 1, 414 if (severities(i) >= min_severity) then15 visible_count = visible_count + 1values this step.true.severities(4) >= min_severityvisible_count ← 2
14if (severities(i) >= min_severity) then15 visible_count = visible_count + 116end ifvalues this step2visible_countif (severities(i) == 3) then
16end if17if (severities(i) == 3) then18 high_count = high_count + 1values this step.true.severities(4) == 3high_count ← 2
17if (severities(i) == 3) then18 high_count = high_count + 119end ifvalues this step2high_countprint '(I0, 1X, I0, 1X, I0)', min_severity, visible_count, high_count
20 end do21 print '(I0, 1X, I0, 1X, I0)', min_severity, visible_count, high_count22end program incident_queue_report_demooutput3 2 2values this step3min_severity2visible_count2high_count
threshold count
The first guard counts incidents at or above the selected severity.
independent count
The high-severity counter is separate from the visible threshold.
loop report
The final line reports the selector and both derived counts.