static PredicateIndex getIndex(BenchmarkArguments args, Config config, Map<String, Object> output) throws IOException {
        if (args.feedFile != null) {
            PredicateIndexBuilder builder = new PredicateIndexBuilder(config);
            AtomicInteger idCounter = new AtomicInteger();
            VespaFeedParser.parseDocuments(
                    args.feedFile, Integer.MAX_VALUE, p -> builder.indexDocument(idCounter.incrementAndGet(), p));
            builder.getStats().putValues(output);
            return builder.build();
        } else {
            try (DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream(args.indexFile)))) {
                long start = System.currentTimeMillis();
                PredicateIndex index = PredicateIndex.fromInputStream(in);
                output.put("Time deserialize index", System.currentTimeMillis() - start);
                return index;
            }
        }
    }
@Test
    void testTargeting() throws IOException {
        HitsVerificationBenchmark.BenchmarkArguments args = new HitsVerificationBenchmark.BenchmarkArguments();
        args.feedFile = "src/test/resources/targeting.json";
        Config config = new Config.Builder().build();
        Map<String, Object> output = new HashMap<>();
        HitsVerificationBenchmark.getIndex(args, config, output);
        assertEquals(46, output.get("Interval index entries"));
    }