mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-19 17:56:41 +10:00
[김훈민] [PINPOINT-213] PinPoint Spy
git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-web/trunk@2653 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
@@ -13,7 +13,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
* @author harebox
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration("classpath:applicationContext-test.xml")
|
||||
@ContextConfiguration("classpath:applicationContext.xml")
|
||||
public class HbaseAgentStatDaoTest {
|
||||
|
||||
@Autowired
|
||||
@@ -22,7 +22,7 @@ public class HbaseAgentStatDaoTest {
|
||||
@Test
|
||||
public void selectAgentStat() {
|
||||
long timestamp = System.currentTimeMillis();
|
||||
List<TAgentStat> result = dao.scanAgentStatList("FRONT-WEB", timestamp - 100000, timestamp);
|
||||
List<TAgentStat> result = dao.scanAgentStatList("FRONT-WEB1", timestamp - 100000, timestamp);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.nhn.pinpoint.web.vo.linechart;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import org.codehaus.jackson.map.ObjectMapper;
|
||||
import org.junit.Test;
|
||||
|
||||
public class SampledLineChartTest {
|
||||
|
||||
@Test
|
||||
public void tdd() throws Exception {
|
||||
int sampleRate = 60;
|
||||
int totalPoints = 10000;
|
||||
|
||||
LineChart lineChart = new SampledLineChart(sampleRate);
|
||||
|
||||
for (long i = 0; i < totalPoints; i++) {
|
||||
lineChart.addPoint(new Long[]{i, i});
|
||||
}
|
||||
|
||||
assertTrue(lineChart.getPoints().size() == totalPoints / sampleRate);
|
||||
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
String result = mapper.writeValueAsString(lineChart);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user