Operational Remediation Reports
Actor Counter Remediation Report
Admit requests against a fixed counter capacity and turn the remaining capacity into an admit, hold, or shed remediation action.
Actor Counter Remediation Report
actor_counter_remediation_report.swift
let requests =
let capacity = 3
var admitted = requests
if admitted > capacity {
admitted = capacity
}
let remaining = capacity - admitted
var action = "admit"
if remaining == 1 {
action = "hold"
}
if remaining == 0 {
action = "shed"
}
let line = "requests=\(requests) admitted=\(admitted) remaining=\(remaining) \(action)"
print(line)
let requests =
let capacity = 3
var admitted = requests
if admitted > capacity {
admitted = capacity
}
let remaining = capacity - admitted
var action = "admit"
if remaining == 1 {
action = "hold"
}
if remaining == 0 {
action = "shed"
}
let line = "requests=\(requests) admitted=\(admitted) remaining=\(remaining) \(action)"
print(line)
let requests =
let capacity = 3
var admitted = requests
if admitted > capacity {
admitted = capacity
}
let remaining = capacity - admitted
var action = "admit"
if remaining == 1 {
action = "hold"
}
if remaining == 0 {
action = "shed"
}
let line = "requests=\(requests) admitted=\(admitted) remaining=\(remaining) \(action)"
print(line)
counter capacity
The counter capacity is modeled with a scalar so the remaining headroom stays deterministic and free of actor identity while driving the remediation action.