Operational Diagnostics Reports
Alert Noise Report
Count Useful Signals
An alert diagnostic report can subtract duplicate alerts and label whether the remaining signal is focused, noisy, or needs review.
Program
Play the program to choose alert count and inspect the noise label.
alert_noise_report.f90
Replay: real traced execution (multi-file project)
program alert_noise_report_demo
implicit none
integer :: alert_count
integer :: duplicate_count
integer :: useful_count
character(len=8) :: label
alert_count = 6
duplicate_count = 2
useful_count = alert_count - duplicate_count
if (useful_count >= 7) then
label = 'noisy'
else if (duplicate_count >= useful_count) then
label = 'review'
else
label = 'focused'
end if
print '(A, I0, 1X, A, I0, 1X, A)', 'alerts=', alert_count, 'useful=', useful_count, trim(label)
end program alert_noise_report_demo
program alert_noise_report_demo
implicit none
integer :: alert_count
integer :: duplicate_count
integer :: useful_count
character(len=8) :: label
alert_count = 3
duplicate_count = 2
useful_count = alert_count - duplicate_count
if (useful_count >= 7) then
label = 'noisy'
else if (duplicate_count >= useful_count) then
label = 'review'
else
label = 'focused'
end if
print '(A, I0, 1X, A, I0, 1X, A)', 'alerts=', alert_count, 'useful=', useful_count, trim(label)
end program alert_noise_report_demo
program alert_noise_report_demo
implicit none
integer :: alert_count
integer :: duplicate_count
integer :: useful_count
character(len=8) :: label
alert_count = 9
duplicate_count = 2
useful_count = alert_count - duplicate_count
if (useful_count >= 7) then
label = 'noisy'
else if (duplicate_count >= useful_count) then
label = 'review'
else
label = 'focused'
end if
print '(A, I0, 1X, A, I0, 1X, A)', 'alerts=', alert_count, 'useful=', useful_count, trim(label)
end program alert_noise_report_demo
alert_count ← 6
8alert_count = 69duplicate_count = 2values this step6alert_countduplicate_count ← 2
8alert_count = 69duplicate_count = 210useful_count = alert_count - duplicate_countvalues this step2duplicate_countuseful_count ← 4
9duplicate_count = 210useful_count = alert_count - duplicate_count11if (useful_count >= 7) thenvalues this step4useful_count6alert_count2duplicate_countif (useful_count >= 7) then
10useful_count = alert_count - duplicate_count11if (useful_count >= 7) then12 label = 'noisy'values this step4useful_countelse if (duplicate_count >= useful_count) then
12 label = 'noisy'13else if (duplicate_count >= useful_count) then14 label = 'review'values this step2duplicate_count4useful_countlabel ← focused
15else16 label = 'focused'17end ifvalues this stepfocusedlabelprint '(A, I0, 1X, A, I0, 1X, A)', 'alerts=', alert_count, 'useful=', …
17 end if18 print '(A, I0, 1X, A, I0, 1X, A)', 'alerts=', alert_count, 'useful=', useful_count, trim(label)19end program alert_noise_report_demooutputalerts=6 useful=4 focusedvalues this step6alert_count4useful_countfocusedlabel
alert_count ← 3
8alert_count = 39duplicate_count = 2values this step3alert_countduplicate_count ← 2
8alert_count = 39duplicate_count = 210useful_count = alert_count - duplicate_countvalues this step2duplicate_countuseful_count ← 1
9duplicate_count = 210useful_count = alert_count - duplicate_count11if (useful_count >= 7) thenvalues this step1useful_count3alert_count2duplicate_countif (useful_count >= 7) then
10useful_count = alert_count - duplicate_count11if (useful_count >= 7) then12 label = 'noisy'values this step1useful_countelse if (duplicate_count >= useful_count) then
12 label = 'noisy'13else if (duplicate_count >= useful_count) then14 label = 'review'values this step2duplicate_count1useful_countlabel ← review
13else if (duplicate_count >= useful_count) then14 label = 'review'15elsevalues this stepreviewlabelprint '(A, I0, 1X, A, I0, 1X, A)', 'alerts=', alert_count, 'useful=', …
17 end if18 print '(A, I0, 1X, A, I0, 1X, A)', 'alerts=', alert_count, 'useful=', useful_count, trim(label)19end program alert_noise_report_demooutputalerts=3 useful=1 reviewvalues this step3alert_count1useful_countreviewlabel
alert_count ← 9
8alert_count = 99duplicate_count = 2values this step9alert_countduplicate_count ← 2
8alert_count = 99duplicate_count = 210useful_count = alert_count - duplicate_countvalues this step2duplicate_countuseful_count ← 7
9duplicate_count = 210useful_count = alert_count - duplicate_count11if (useful_count >= 7) thenvalues this step7useful_count9alert_count2duplicate_countif (useful_count >= 7) then
10useful_count = alert_count - duplicate_count11if (useful_count >= 7) then12 label = 'noisy'values this step7useful_countlabel ← noisy
11if (useful_count >= 7) then12 label = 'noisy'13else if (duplicate_count >= useful_count) thenvalues this stepnoisylabelprint '(A, I0, 1X, A, I0, 1X, A)', 'alerts=', alert_count, 'useful=', …
17 end if18 print '(A, I0, 1X, A, I0, 1X, A)', 'alerts=', alert_count, 'useful=', useful_count, trim(label)19end program alert_noise_report_demooutputalerts=9 useful=7 noisyvalues this step9alert_count7useful_countnoisylabel
duplicate count
The duplicate count is fixed so the selector only changes the incoming alert volume.
useful signal
`alert_count - duplicate_count` produces the diagnostic value for the report.
noise label
The final label separates focused, noisy, and review cases.