class LargeFile2MTest {
    static String str;
    static ObjectMapper mapper = new ObjectMapper();

    static final int COUNT = 100;

    static {
        try (
                InputStream fis = LargeFile2MTest.class.getClassLoader().getResourceAsStream("data/large-file-2m.json.zip");
                BufferedInputStream bis = new BufferedInputStream(fis);
                ZipInputStream zipIn = new ZipInputStream(bis)
        ) {
            zipIn.getNextEntry();
            str = IOUtils.toString(zipIn, "UTF-8");
            zipIn.closeEntry();
        } catch (IOException ex) {
            ex.printStackTrace();
        }
    }

    @Benchmark
    public void fastjson1(Blackhole bh) {
        bh.consume(com.alibaba.fastjson.JSON.parseObject(str));
    }

    @Benchmark
    public void fastjson2(Blackhole bh) {
        bh.consume(JSON.parseObject(str));
    }

    @Benchmark
    public void jackson(Blackhole bh) throws Exception {
        bh.consume(mapper.readValue(str, HashMap.class));
    }

    public void perfTest(Runnable task) {<FILL_FUNCTION_BODY>}

    public void fastjson1_perf_test() {
        perfTest(() -> com.alibaba.fastjson.JSON.parseObject(str));
    }

    public void fastjson2_perf_test() {
        perfTest(() -> JSON.parseObject(str));
    }

    public void jackson_perf_test() throws Exception {
        perfTest(() -> {
            try {
                mapper.readValue(str, HashMap.class);
            } catch (IOException e) {
                e.printStackTrace();
            }
        });
    }

    public static void main(String[] args) throws Exception {
        new LargeFile2MTest().fastjson2_perf_test();
//        new LargeFile2MTest().fastjson1_perf_test();
//        new LargeFile2MTest().jackson_perf_test();
//        Options options = new OptionsBuilder()
//                .include(LargeFile2MTest.class.getName())
//                .mode(Mode.Throughput)
//                .timeUnit(TimeUnit.MILLISECONDS)
//                .forks(1)
//                .build();
//        new Runner(options).run();
    }
}

        long start = System.currentTimeMillis();
        for (int i = 0; i < COUNT; ++i) {
            task.run();
        }
        long millis = System.currentTimeMillis() - start;
        System.out.println("millis : " + millis);
        // zulu17.32.13 : 1299 1136
        // zulu11.52.13 : 1187 1145
        // zulu8.58.0.13 : 1154
    
<no_super_class>