getServiceState: configurable threshold
for testing
This commit is contained in:
parent
ec52c980fb
commit
a1cca92a8c
1 changed files with 2 additions and 2 deletions
|
@ -24,8 +24,8 @@ const titles = {
|
|||
dead: 'This service is unresponsive.',
|
||||
}
|
||||
|
||||
function getServiceState (status, latency) {
|
||||
if (status && latency > SLOW_THRESHOLD) {
|
||||
export function getServiceState (status, latency, threshold = SLOW_THRESHOLD) {
|
||||
if (status && latency > threshold) {
|
||||
return 'slow'
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue