Operational Reliability Reports
Incident Queue Reliability Report
Count visible incidents and high-severity incidents from a small queue.
incident-queue-report
Counting with a bounded loop makes the threshold and visible queue size explicit.
Incident Queue Reliability Report
incident_queue_reliability_report.rb
Replay: real traced execution (multi-file project)
min_severity = 2
severities = [1, 2, 3, 3]
visible = 0
high = 0
severities.each do |severity|
if severity >= min_severity
visible += 1
end
if severity >= 3
high += 1
end
end
puts "min=#{min_severity}"
puts "visible=#{visible}"
puts "high=#{high}"
min_severity = 1
severities = [1, 2, 3, 3]
visible = 0
high = 0
severities.each do |severity|
if severity >= min_severity
visible += 1
end
if severity >= 3
high += 1
end
end
puts "min=#{min_severity}"
puts "visible=#{visible}"
puts "high=#{high}"
min_severity = 3
severities = [1, 2, 3, 3]
visible = 0
high = 0
severities.each do |severity|
if severity >= min_severity
visible += 1
end
if severity >= 3
high += 1
end
end
puts "min=#{min_severity}"
puts "visible=#{visible}"
puts "high=#{high}"
min_severity ← 2, severities ← [1, 2, 3, 3], visible ← 0, high ← 0
1min_severity→ 2 = 2 #@min_severity=1, 32severities→ [1, 2, 3, 3] = [1, 2, 3, 3]3visible→ 0 = 04high→ 0 = 056severities[1, 2, 3, 3].each do |severity|7 if severity >= min_severity8 visible += 19 end1011 if severity >= 312 high += 113 end14enddo |severity|
pass 1 of 46severities.each do |severity1|7 if severity >= min_severity8 visible += 1All 4 passes — pass 1 is the card above pass severityseveritieshigh1 1 — — 2 2 — — 3 3 — 0 → 1 4 3 [1, 2, 3, 3] 1 → 2 visible ← 1
pass 1 of 36severities.each do |severity|7 if severity2 >= min_severity28 visible→ 1 += 19 endAll 3 passes — pass 1 is the card above pass severityseveritiesvisiblehigh1 2 — 0 → 1 — 2 3 — 1 → 2 0 → 1 3 3 [1, 2, 3, 3] 2 → 3 1 → 2 high ← 1
pass 1 of 211if severity3 >= 312 high→ 1 += 113endhigh ← 2
pass 2 of 26severities[1, 2, 3, 3].each do |severity|7 if severity >= min_severity8 visible += 19 end1011 if severity3 >= 312 high→ 2 += 113 end14endputs "min=#{min_severity}"
16puts "min=#{min_severity2}"17puts "visible=#{visible3}"18puts "high=#{high2}"outputmin=2 visible=3 high=2
min_severity ← 1, severities ← [1, 2, 3, 3], visible ← 0, high ← 0
1min_severity→ 1 = 12severities→ [1, 2, 3, 3] = [1, 2, 3, 3]3visible→ 0 = 04high→ 0 = 056severities[1, 2, 3, 3].each do |severity|7 if severity >= min_severity8 visible += 19 end1011 if severity >= 312 high += 113 end14enddo |severity|
pass 1 of 46severities.each do |severity1|7 if severity >= min_severity8 visible += 1All 4 passes — pass 1 is the card above pass severityseveritieshigh1 1 — — 2 2 — — 3 3 — 0 → 1 4 3 [1, 2, 3, 3] 1 → 2 visible ← 1
pass 1 of 46severities.each do |severity|7 if severity1 >= min_severity18 visible→ 1 += 19 endAll 4 passes — pass 1 is the card above pass severityseveritiesvisiblehigh1 1 — 0 → 1 — 2 2 — 1 → 2 — 3 3 — 2 → 3 0 → 1 4 3 [1, 2, 3, 3] 3 → 4 1 → 2 high ← 1
pass 1 of 211if severity3 >= 312 high→ 1 += 113endhigh ← 2
pass 2 of 26severities[1, 2, 3, 3].each do |severity|7 if severity >= min_severity8 visible += 19 end1011 if severity3 >= 312 high→ 2 += 113 end14endputs "min=#{min_severity}"
16puts "min=#{min_severity1}"17puts "visible=#{visible4}"18puts "high=#{high2}"outputmin=1 visible=4 high=2
min_severity ← 3, severities ← [1, 2, 3, 3], visible ← 0, high ← 0
1min_severity→ 3 = 32severities→ [1, 2, 3, 3] = [1, 2, 3, 3]3visible→ 0 = 04high→ 0 = 056severities[1, 2, 3, 3].each do |severity|7 if severity >= min_severity8 visible += 19 end1011 if severity >= 312 high += 113 end14enddo |severity|
pass 1 of 46severities.each do |severity1|7 if severity >= min_severity8 visible += 1All 4 passes — pass 1 is the card above pass severitymin_severityseveritiesvisiblehigh1 1 — — — — 2 2 — — — — 3 3 3 — 0 → 1 0 → 1 4 3 3 [1, 2, 3, 3] 1 → 2 1 → 2 visible ← 1
pass 1 of 26severities.each do |severity|7 if severity3 >= min_severity38 visible→ 1 += 19 endhigh ← 1
pass 1 of 211if severity3 >= 312 high→ 1 += 113endvisible ← 2
pass 2 of 26severities.each do |severity|7 if severity3 >= min_severity38 visible→ 2 += 19 endhigh ← 2
pass 2 of 26severities[1, 2, 3, 3].each do |severity|7 if severity >= min_severity8 visible += 19 end1011 if severity3 >= 312 high→ 2 += 113 end14endputs "min=#{min_severity}"
16puts "min=#{min_severity3}"17puts "visible=#{visible2}"18puts "high=#{high2}"outputmin=3 visible=2 high=2