PageRenderTime 5255ms CodeModel.GetById 7ms RepoModel.GetById 8ms app.codeStats 0ms

/gmonitor/gmonitor-core/src/test/java/com/zdingke/gmonitor/utils/test/TestMetricJsonCreateUtil.java

https://gitlab.com/zhengdingke/gmonitor
Java | 23 lines | 18 code | 5 blank | 0 comment | 0 complexity | 307a394ec40b034adfe6e7e7339d1f22 MD5 | raw file
  1. package com.zdingke.gmonitor.utils.test;
  2. import org.junit.Test;
  3. import com.alibaba.fastjson.JSON;
  4. import com.zdingke.gmonitor.MetricsJson;
  5. import com.zdingke.gmonitor.utils.MetricJsonCreateUtil;
  6. public class TestMetricJsonCreateUtil {
  7. @Test
  8. public void testGetMetricsJsonByServiceType() {
  9. MetricsJson metric = MetricJsonCreateUtil.getMetricsJsonByServiceType("kafka",
  10. "E:/eclipse/eclipse_pro/kingee_pro/bigdata/ganglia-metric/target/test-classes/unittest");
  11. System.out.println(metric.getServiceType());
  12. }
  13. @Test
  14. public void testGetModuleJsonObjByServiceType() {
  15. MetricJsonCreateUtil.getModuleJsonObjByServiceType("kafka", "E:/eclipse/eclipse_pro/kingee_pro/bigdata/ganglia-metric/target/test-classes/unittest")
  16. .stream().forEach(j -> System.out.println("result:" + JSON.toJSONString(j, true)));
  17. }
  18. }