Package org.elasticsearch.common

Examples of org.elasticsearch.common.StopWatch.stop()


            BulkResponse response = request.execute().actionGet();
            if (response.hasFailures()) {
                System.err.println("failures...");
            }
            if (((i * BATCH) % 10000) == 0) {
                System.out.println("Indexed " + (i * BATCH) + " took " + stopWatch.stop().lastTaskTime());
                stopWatch.start();
            }
        }
        System.out.println("Indexing took " + stopWatch.totalTime() + ", TPS " + (((double) COUNT) / stopWatch.totalTime().secondsFrac()));

View Full Code Here


        for (; i <= COUNT; i++) {
//            client1.admin().cluster().preparePingSingle("test", "type1", Integer.toString(i)).execute().actionGet();
            client1.prepareIndex("test", "type1").setId(Integer.toString(i)).setSource(source(Integer.toString(i), "test" + i))
                    .setCreate(false).execute().actionGet();
            if ((i % 10000) == 0) {
                System.out.println("Indexed " + i + " took " + stopWatch.stop().lastTaskTime());
                stopWatch.start();
            }
        }
        System.out.println("Indexing took " + stopWatch.totalTime() + ", TPS " + (((double) COUNT) / stopWatch.totalTime().secondsFrac()));
View Full Code Here

                }
            }
            // do a list of the files
            store.directory().listAll();
        }
        stopWatch.stop();
        System.out.println("Warmup Took: " + stopWatch.shortSummary());

        for (int i = 0; i < readerThreads.length; i++) {
            readerThreads[i] = new Thread(new ReaderThread(), "Reader[" + i + "]");
        }
View Full Code Here

                BulkResponse response = request.execute().actionGet();
                if (response.hasFailures()) {
                    System.err.println("--> failures...");
                }
                if (((i * BATCH) % 10000) == 0) {
                    System.out.println("--> Indexed " + (i * BATCH) * (1 + CHILD_COUNT) + " took " + stopWatch.stop().lastTaskTime());
                    stopWatch.start();
                }
            }
            System.out.println("--> Indexing took " + stopWatch.totalTime() + ", TPS " + (((double) (COUNT * (1 + CHILD_COUNT))) / stopWatch.totalTime().secondsFrac()));
        } catch (Exception e) {
View Full Code Here

        Indexer warmup = new Indexer(-1).max(10000);
        warmup.start();
        barrier1.await();
        barrier2.await();
        latch.await();
        stopWatch.stop();
        System.out.println("Done Warmup, took [" + stopWatch.totalTime() + "]");

        latch = new CountDownLatch(searcherThreads.length + indexThreads.length);
        barrier1 = new CyclicBarrier(searcherThreads.length + indexThreads.length + 1);
        barrier2 = new CyclicBarrier(searcherThreads.length + indexThreads.length + 1);
View Full Code Here

        StopWatch stopWatch = new StopWatch();
        stopWatch.start();
        barrier2.await();

        latch.await();
        stopWatch.stop();

        System.out.println("Took: " + stopWatch.shortSummary());

        for (int i = 0; i < 3; i++) {
            System.gc();
View Full Code Here

        stopWatch.start();

        barrier2.await();

        latch.await();
        stopWatch.stop();

        System.out.println("Done, took [" + stopWatch.totalTime() + "]");
        System.out.println("Sleeping before close: " + sleepBeforeClose);
        Thread.sleep(sleepBeforeClose.millis());
View Full Code Here

        StopWatch stopWatch = new StopWatch().start();
        System.out.println("Running " + NUMBER_OF_ITERATIONS);
        for (long i = 0; i < NUMBER_OF_ITERATIONS; i++) {
            UUID.randomUUID().toString();
        }
        System.out.println("Generated in " + stopWatch.stop().totalTime() + " TP Millis " + (NUMBER_OF_ITERATIONS / stopWatch.totalTime().millisFrac()));

        System.out.println("Generating using " + NUMBER_OF_THREADS + " threads with " + NUMBER_OF_ITERATIONS + " iterations");
        final CountDownLatch latch = new CountDownLatch(NUMBER_OF_THREADS);
        Thread[] threads = new Thread[NUMBER_OF_THREADS];
        for (int i = 0; i < threads.length; i++) {
View Full Code Here

        stopWatch = new StopWatch().start();
        for (Thread thread : threads) {
            thread.start();
        }
        latch.await();
        stopWatch.stop();
        System.out.println("Generate in " + stopWatch.totalTime() + " TP Millis " + ((NUMBER_OF_ITERATIONS * NUMBER_OF_THREADS) / stopWatch.totalTime().millisFrac()));
    }
}
View Full Code Here

            } else {
                engine.index(new Engine.Index(null, new Term("_id", sId), pDoc));
            }
        }
        engine.refresh(new Engine.Refresh(true));
        stopWatch.stop();
        System.out.println("Warmup of [" + contentItems.length + "] content items, took " + stopWatch.totalTime());

        return this;
    }
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.