public static Points<String> generateFakeStringPoints() { Points<String> points = Points.create(Granularity.FULL); long startTime = 1234567L; for (int i = 0; i < 5; i++) { long timeNow = startTime + i * 1000; Points.Point<String> point = new Points.Point<String>(timeNow, String.valueOf(timeNow)); } return points; }
public static Points<Long> generateFakeFullResPoints() { Points<Long> points = Points.create(Granularity.FULL); long baseTime = 1234567L; for (int count = 0; count < 5; count++) { Points.Point<Long> point = new Points.Point<Long>(baseTime + (count * 1000), (long) count); points.add(point); } return points; }
public static Points<Rollup> generateFakeRollupPoints() { Points<Rollup> points = Points.create(Granularity.MIN_5); long baseTime = 1234567L; for (int count = 0; count < 5; count++) { final Rollup rollup = new Rollup(); rollup.setCount(count * 100); rollup.getAverage().setLongValue(count); Points.Point<Rollup> point = new Points.Point<Rollup>(baseTime + (count * 1000), rollup); points.add(point); } return points; }