use of com.alipay.lookout.api.Measurement in project sofa-rpc by sofastack.
the class RpcLookoutTest method testThreadPoolConfig.
/**
* test thread pool config
*
* @throws Exception Exception
*/
@Test
public void testThreadPoolConfig() throws Exception {
Metric metric = fetchWithNameAndMethod("rpc.bolt.threadpool.config", "");
Collection<Measurement> measurements = metric.measure().measurements();
assertTrue(measurements.size() == 1);
for (Measurement measurement : measurements) {
// 判断ThreadPool启动配置
Object obj = measurement.value();
assertEquals(30, corePoolSize.get(obj));
assertEquals(500, maxPoolSize.get(obj));
assertEquals(600, queueSize.get(obj));
}
}
Aggregations