public static void main(String[] rawArgs) throws IOException {
        Optional<BenchmarkArguments> wrappedArgs = getArguments(rawArgs);
        if (wrappedArgs.isEmpty()) return;

        BenchmarkArguments args = wrappedArgs.get();
        Map<String, Object> output = new TreeMap<>();
        addArgsToOutput(output, args);

        Config config = new Config.Builder()
                .setArity(args.arity)
                .setUseConjunctionAlgorithm(args.algorithm == Algorithm.CONJUNCTION)
                .build();

        PredicateIndex index = getIndex(args, config, output);

        Stream<PredicateQuery> queries = parseQueries(args.format, args.queryFile);
        int totalHits = runQueries(index, queries, args.outputFile);
        output.put("Total hits", totalHits);
        writeOutputToStandardOut(output);
    }
A test that runs outputs the hits for each query into result file.

@author bjorncs
predicate-search/src/main/java/com/yahoo/search/predicate/benchmarks/HitsVerificationBenchmark.java