Package com.dianping.cat.report.baseline.impl

Examples of com.dianping.cat.report.baseline.impl.DefaultBaselineCreator


    }
  }

  @Test
  public void test() {
    DefaultBaselineCreator creator = new DefaultBaselineCreator();
    double[] data = new double[60];

    for (int i = 0; i < data.length; i++) {
      data[i] = i;

      if (i == 20 || i == 30 || i == 40) {
        data[i] = 100;
      }
      if (i == 21 || i == 31 || i == 41) {
        data[i] = 200;
      }
      if (i == 25 || i == 35 || i == 45) {
        data[i] = 300;
      }
      if (i == 26 || i == 36 || i == 46) {
        data[i] = 300;
      }
    }

    double[] result = creator.denoise(data, 10);

    for (int i = 0; i < result.length; i++) {
      Assert.assertEquals(result[i] < 60, true);
    }
  }
View Full Code Here

TOP

Related Classes of com.dianping.cat.report.baseline.impl.DefaultBaselineCreator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.