private double benchmark(RankingExpression gbdt, Context context, int iterations, String description) {
        oul("Running '" + description + "':");
        out("   Warming up ...");
        double total=0;
        total+=benchmarkIterations(gbdt,context,iterations/5);
        oul("done");

        out("   Running " + iterations + " of '" + description + "' ...");
        long tStartTime=System.currentTimeMillis();
        total+=benchmarkIterations(gbdt,context,iterations);
        long totalTime=System.currentTimeMillis()-tStartTime;
        oul("done");
        oul("   Total time running '" + description + "': " + totalTime + " ms (" + totalTime*1000/iterations + " microseconds/expression)");
        return total;
    }
Two small benchmarks of ranking expression evaluation

@author bratseth
searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/EvaluationBenchmark.java