public void run()

in gflog-benchmark/src/main/java/com/epam/deltix/gflog/benchmark/util/LatencyBenchmarkRunner.java [138:170]


        public void run() {
            if (affinity >= 0) {
                Affinity.setAffinity(affinity);
            }

            final BenchmarkState state = new BenchmarkState();

            long next = System.nanoTime();
            boolean warmup = true;

            while (active.get()) {
                final long start = System.nanoTime();

                if (start < next) {
                    idle.idle(0);
                    continue;
                }

                for (int i = 0; i < batch; i++) {
                    command.accept(state);
                }

                final long end = System.nanoTime();
                histogram.recordValue(end - start);
                next = (CATCHUP ? next : end) + interval;

                if (warmup && measure.get()) {
                    histogram.reset();
                    warmup = false;
                    next = System.nanoTime() + interval;
                }
            }
        }