use of com.navercorp.pinpoint.profiler.monitor.metric.rpc.DefaultRpcMetric in project pinpoint by naver.
the class DefaultRpcMetricTest method testAddResponseTime.
@Test
public void testAddResponseTime() throws Exception {
HistogramSchema schema = ASYNC_HTTP_CLIENT.getHistogramSchema();
DefaultRpcMetric metric = new DefaultRpcMetric(ASYNC_HTTP_CLIENT);
metric.addResponseTime("test1", schema.getFastSlot().getSlotTime(), false);
metric.addResponseTime("test2", schema.getSlowSlot().getSlotTime(), false);
metric.addResponseTime("test2", schema.getSlowSlot().getSlotTime(), false);
metric.addResponseTime("test3", schema.getFastSlot().getSlotTime(), true);
metric.addResponseTime("test3", schema.getFastSlot().getSlotTime(), true);
metric.addResponseTime("test3", schema.getVerySlowSlot().getSlotTime(), true);
List<HistogramSnapshot> snapshotList = metric.createSnapshotList();
Assert.assertEquals(snapshotList.size(), 3);
}
Aggregations