private void load(File dir, String file, String hostname) {
System.out.println("Starting: " + new File(dir, file));
long t1 = System.nanoTime();
try {
ZicoDataLoader loader = new ZicoDataLoader("127.0.0.1", 8640, hostname, "");
loader.load(new File(dir, file).getPath());
records.addAndGet(loader.getRecords());
bytes.addAndGet(loader.getBytes());
long t = (System.nanoTime()-t1)/1000000;
long recsps = 1000L * loader.getRecords() / t;
long bytesps = 1000L * loader.getBytes() / t;
System.out.println("File " + dir + "/" + file + " finished: t=" + t
+ " records=" + loader.getRecords() + " (" + recsps + " recs/s)"
+ " bytes=" + loader.getBytes() + "(" + bytesps + " bytes/s).");
} catch (Exception e) {
errors.incrementAndGet();
}
passes.incrementAndGet();