src/middlewares/circuit-breaker.js
function checkThreshold(item, ctx) {
		if (item.count >= item.opts.minRequestCount) {
			const rate = item.failures / item.count;
			if (rate >= item.opts.threshold)
				trip(item, ctx);
		}
	}
function checkThreshold(item, ctx) {
		if (item.count >= item.opts.minRequestCount) {
			const rate = item.failures / item.count;
			if (rate >= item.opts.threshold)
				trip(item, ctx);
		}
	}
function checkThreshold ( item , ctx ) { if ( item . count >= item . opts . minRequestCount ) { const rate = item . failures / item . count ; if ( rate >= item . opts . threshold ) trip ( item , ctx ) ; } }
Check circuit-breaker failure threshold of Endpoint

@param {Object} item
@param {Context} ctx
Check circuit - breaker failure threshold of Endpoint