Operational Reliability Reports
Service Window Reliability Report
Summarize whether an open service window is ready, watched, or blocked.
service-window-report
Operational status can be built from small scalar checks. Later guards can raise the status without hiding the earlier values.
Service Window Reliability Report
ServiceWindowReliabilityReport.scala
Replay: real traced execution (multi-file project)
object Main {
def main(args: Array[String]): Unit = {
val failedChecks = 1
val openMinutes = 45
var status = "ready"
if (failedChecks > 0 && openMinutes > 30) {
status = "watch"
}
if (failedChecks >= 3) {
status = "blocked"
}
println("failed=" + failedChecks)
println("open=" + openMinutes)
println("status=" + status)
}
}
object Main {
def main(args: Array[String]): Unit = {
val failedChecks = 0
val openMinutes = 45
var status = "ready"
if (failedChecks > 0 && openMinutes > 30) {
status = "watch"
}
if (failedChecks >= 3) {
status = "blocked"
}
println("failed=" + failedChecks)
println("open=" + openMinutes)
println("status=" + status)
}
}
object Main {
def main(args: Array[String]): Unit = {
val failedChecks = 3
val openMinutes = 45
var status = "ready"
if (failedChecks > 0 && openMinutes > 30) {
status = "watch"
}
if (failedChecks >= 3) {
status = "blocked"
}
println("failed=" + failedChecks)
println("open=" + openMinutes)
println("status=" + status)
}
}
failedChecks ← 1, openMinutes ← 45, status ← ready
1object Main {2 def main(args: Array[String]): Unit = {3 val failedChecks→ 1 = 1 //@failedChecks=0, 34 val openMinutes→ 45 = 455 var status→ ready = "ready"67 if (failedChecks > 0 && openMinutes > 30) {status ← watch
7if (failedChecks1 > 0 && openMinutes45 > 30) {8 status→ watch = "watch"9}10if (failedChecks >= 3) {println("failed=" + failedChecks)
14 println("failed=" + failedChecks1)15 println("open=" + openMinutes45)16 println("status=" + statuswatch)17 }18}outputfailed=1 open=45 status=watch
failedChecks ← 0, openMinutes ← 45, status ← ready
1object Main {2 def main(args: Array[String]): Unit = {3 val failedChecks→ 0 = 04 val openMinutes→ 45 = 455 var status→ ready = "ready"67 if (failedChecks > 0 && openMinutes > 30) {8 status = "watch"9 }10 if (failedChecks >= 3) {11 status = "blocked"12 }1314 println("failed=" + failedChecks0)15 println("open=" + openMinutes45)16 println("status=" + statusready)17 }18}outputfailed=0 open=45 status=ready
failedChecks ← 3, openMinutes ← 45, status ← ready
1object Main {2 def main(args: Array[String]): Unit = {3 val failedChecks→ 3 = 34 val openMinutes→ 45 = 455 var status→ ready = "ready"67 if (failedChecks > 0 && openMinutes > 30) {status ← watch
7if (failedChecks3 > 0 && openMinutes45 > 30) {8 status→ watch = "watch"9}10if (failedChecks >= 3) {status ← blocked
9}10if (failedChecks3 >= 3) {11 status→ blocked = "blocked"12}println("failed=" + failedChecks)
14 println("failed=" + failedChecks3)15 println("open=" + openMinutes45)16 println("status=" + statusblocked)17 }18}outputfailed=3 open=45 status=blocked