src/middlewares/metrics.js
function shouldMetric(ctx) {
	if (ctx.broker.options.metrics) {
		sampleCounter++;
		if (sampleCounter * ctx.broker.options.metricsRate >= 1.0) {
			sampleCounter = 0;
			return true;
		}
	}

	return false;
}
function shouldMetric(ctx) {
	if (ctx.broker.options.metrics) {
		sampleCounter++;
		if (sampleCounter * ctx.broker.options.metricsRate >= 1.0) {
			sampleCounter = 0;
			return true;
		}
	}

	return false;
}
function shouldMetric ( ctx ) { if ( ctx . broker . options . metrics ) { sampleCounter ++ ; if ( sampleCounter * ctx . broker . options . metricsRate >= 1.0 ) { sampleCounter = 0 ; return true ; } } return false ; }
Check should metric the current context

@param {Context} ctx
@returns {Boolean}

@memberof ServiceBroker
Check should metric the current context