public void testWriterPerformance() throws IOException {
  StopWatch stopWatch=new StopWatch();
  stopWatch.start();
  List<TestTimeSeriesAPIEntity> entityList=new ArrayList<TestTimeSeriesAPIEntity>();
  int i=0;
  while (i++ < 100000) {
    entityList.add(newInstance());
    if (entityList.size() >= 1000) {
      ModifyResult<String> result=storage.create(entityList,entityDefinition);
      Assert.assertNotNull(result);
      entityList.clear();
    }
  }
  stopWatch.stop();
  LOG.info("Wrote 100000 records in " + stopWatch.getTime() + " ms");
}

public void testWriterPerformance ( ) throws IOException { StopWatch stopWatch = new StopWatch ( ) ; stopWatch . start ( ) ; List < TestTimeSeriesAPIEntity > entityList = new ArrayList < TestTimeSeriesAPIEntity > ( ) ; int i = 0 ; while ( i ++ < 100000 ) { entityList . add ( newInstance ( ) ) ; if ( entityList . size ( ) >= 1000 ) { ModifyResult < String > result = storage . create ( entityList , entityDefinition ) ; Assert . assertNotNull ( result ) ; entityList . clear ( ) ; } } stopWatch . stop ( ) ; LOG . info ( "Wrote 100000 records in " + stopWatch . getTime ( ) + " ms" ) ; }
todo : investigate why writing performance becomes slower as records count increases 1 ) wrote 100000 records in about 18820 ms for empty table 2 ) wrote 100000 records in about 35056 ms when 1m records in table
