예제 #1
0
 @Test
 @Ignore
 public void generateDailyHistoryData() throws IOException {
   Path path = Paths.get("/home/doom369/blynk/data/[email protected]/daily_data.bin");
   // now - 365 days.
   long ts = (System.currentTimeMillis() / AverageAggregator.DAY - 365);
   for (int i = 0; i < 365; i++) {
     StorageWorker.write(path, i, (ts + i) * AverageAggregator.DAY);
   }
 }
예제 #2
0
 @Test
 @Ignore
 public void generateHourlyHistoryData() throws IOException {
   int count = 7 * 24;
   Path path = Paths.get("/home/doom369/blynk/data/[email protected]/hourly_data.bin");
   // now - 1 week.
   long ts = (System.currentTimeMillis() / AverageAggregator.HOUR - count);
   for (int i = 0; i < count; i++) {
     StorageWorker.write(path, i, (ts + i) * AverageAggregator.HOUR);
   }
 }