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.',
|
dead: 'This service is unresponsive.',
|
||||||
}
|
}
|
||||||
|
|
||||||
function getServiceState (status, latency) {
|
export function getServiceState (status, latency, threshold = SLOW_THRESHOLD) {
|
||||||
if (status && latency > SLOW_THRESHOLD) {
|
if (status && latency > threshold) {
|
||||||
return 'slow'
|
return 'slow'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue