Package krati.util

Examples of krati.util.Chronos.tick()


    HashMap<String, List<E>> map = new HashMap<String, List<E>>();
   
    try {
      long maxScn = collect(map, elements);
      store(map, maxScn);
      logger.info(ta.getName() + " applied rolling update in " + c.tick() + " ms");
      return true;
    } catch (Exception e) {
      logger.error(ta.getName() + " failed to update indexes", e);
    } finally {
      map.clear();
View Full Code Here


   
    ConnectionsCollector connectionsCollector = new ConnectionsCollector(connectionsStoreCapacity);
    connectionsCollector.collect(elementStore, 5 /* maxKeyLength */);
    connectionsCollector.store(connectionsStore);
   
    System.out.printf("Bootstrap done in %d ms%n", c.tick());
  }
}
View Full Code Here

    Chronos c = new Chronos();
    for(File f : dataDir.listFiles()) {
      if(f.isFile()) {
        try {
          loadDataFile(f, dataArray);
          System.out.printf("%s loaded in %d ms%n", f.getAbsolutePath(), c.tick());
        } catch (Exception e) {
          e.printStackTrace();
        }
      }
    }
View Full Code Here

   
    TermsScanner scanner = new TermsScanner(termsDir);
    scanner.scan(new CompositeTermsHandler().add(new TermsDedup()).add(elementStoreBootstrap));
    elementStore.sync();
   
    System.out.printf("Bootstrap done in %d ms%n", c.tick());
  }
}
View Full Code Here

   
    ConnectionsScanner scanner = new ConnectionsScanner(connectionsDir);
    scanner.scan(bootstrap);
    connectionsStore.sync();
   
    System.out.printf("Bootstrap done in %d ms%n", c.tick());
  }
}
View Full Code Here

   
    ConnectionsScanner scanner = new ConnectionsScanner(connectionsDir);
    scanner.scan(bootstrap);
    connectionsStore.sync();
   
    System.out.printf("Bootstrap done in %d ms%n", c.tick());
  }
}
View Full Code Here

    System.out.printf("Initialize typeahead %s ...%n", config.getName());
   
    GenericTypeaheadInitializer<TypeaheadElement> initializer = new GenericTypeaheadInitializer<TypeaheadElement>(config);
    GenericTypeahead<TypeaheadElement> typeahead = (GenericTypeahead<TypeaheadElement>) initializer.getTypeahead();
   
    System.out.printf("Initialize typeahead %s: %d ms%n", config.getName(), c.tick());
   
    /**
     * Bootstrap element-store
     */
    ArrayStoreElement<TypeaheadElement> elementStore = typeahead.getElementStore();
View Full Code Here

   
    TermsScanner scanner = new TermsScanner(termsDir);
    scanner.scan(new CompositeTermsHandler().add(new TermsDedup()).add(elementStoreBootstrap));
    elementStore.sync();
   
    System.out.printf("Bootstrap %s: %d ms%n", elementStoreName, c.tick());
   
    /**
     * Bootstrap connections-store
     */
    ConnectionsStore<String> connectionsStore = typeahead.getConnectionsStore();
View Full Code Here

   
    ConnectionsCollector connectionsCollector = new ConnectionsCollector(config.getConnectionsStoreCapacity());
    connectionsCollector.collect(elementStore, config.getMaxKeyLength());
    connectionsCollector.store(connectionsStore);
   
    System.out.printf("Bootstrap %s: %d ms%n", connectionsStoreName, c.tick());
   
    System.out.println();
    System.out.printf("Total: %d seconds%n", c.getTotalTime()/1000);
  }
}
View Full Code Here

   
    // Set NetworkTypehead connections store hwMark
    typeahead.getConnectionsStore().saveHWMark(maxScn);
    typeahead.getConnectionsStore().sync();
   
    System.out.printf("Time: %d ms.%n", c.tick());
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.