private void run(String expressionString, List<Map<String, Double>> features, int iterations) throws ParseException {
        // Optimize
        RankingExpression expression = new RankingExpression(expressionString);
        DoubleOnlyArrayContext contextPrototype = new DoubleOnlyArrayContext(expression, true);
        OptimizationReport forestOptimizationReport = new ExpressionOptimizer().optimize(expression, contextPrototype);
        System.out.println(forestOptimizationReport);
        System.out.println("Optimized expression: " + expression.getRoot());

        // Warm up
        out("Warming up ...");
        double total = 0;
        total += benchmarkIterations(expression , contextPrototype, features, Math.max(iterations/5, 1));
        oul("done");

        // Benchmark
        out("Running " + iterations + " of 'stream' ...");
        long tStartTime = System.currentTimeMillis();
        total += benchmarkIterations(expression, contextPrototype, features, iterations);
        long totalTime = System.currentTimeMillis() - tStartTime;
        oul("done");
        oul("   Total time running 'stream': " + totalTime +
            " ms (" + totalTime*1000/(iterations*features.size()) + " microseconds/expression)");
    }
Read an ad-hoc file format with some similarly ad hoc code
searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/StreamEvaluationBenchmark.java