class EishayWriteBinaryAutoType {
    static MediaContent mc;
    static SymbolTable symbolTable = JSONB.symbolTable(
            "com.alibaba.fastjson2.benchmark.eishay.vo.MediaContent",
            "media",
            "images",
            "height",
            "size",
            "title",
            "uri",
            "width",
            "bitrate",
            "duration",
            "format",
            "persons",
            "player"
    );

    static {
        try {
            InputStream is = EishayWriteBinaryAutoType.class.getClassLoader().getResourceAsStream("data/eishay.json");
            String str = IOUtils.toString(is, "UTF-8");
            mc = JSONReader.of(str)
                    .read(MediaContent.class);
        } catch (Throwable ex) {
            ex.printStackTrace();
        }
    }

//    @Benchmark
    public void fastjson2UTF8Bytes(Blackhole bh) {
        bh.consume(JSON.toJSONBytes(mc, JSONWriter.Feature.WriteClassName));
    }

    @Benchmark
    public void fastjson2JSONB(Blackhole bh) {
        bh.consume(
                JSONB.toBytes(
                        mc,
                        JSONWriter.Feature.WriteClassName,
                        JSONWriter.Feature.IgnoreNoneSerializable,
                        JSONWriter.Feature.FieldBased,
                        JSONWriter.Feature.ReferenceDetection,
                        JSONWriter.Feature.WriteNulls,
                        JSONWriter.Feature.NotWriteDefaultValue,
                        JSONWriter.Feature.NotWriteHashMapArrayListClassName,
                        JSONWriter.Feature.WriteNameAsSymbol)
        );
    }

    public void fastjson2JSONB_symbols(Blackhole bh) {
        bh.consume(
                JSONB.toBytes(
                        mc,
                        symbolTable,
                        JSONWriter.Feature.WriteClassName,
                        JSONWriter.Feature.IgnoreNoneSerializable,
                        JSONWriter.Feature.FieldBased,
                        JSONWriter.Feature.ReferenceDetection,
                        JSONWriter.Feature.WriteNulls,
                        JSONWriter.Feature.NotWriteDefaultValue,
                        JSONWriter.Feature.NotWriteHashMapArrayListClassName,
                        JSONWriter.Feature.WriteNameAsSymbol)
        );
    }

    @Benchmark
    public void javaSerialize(Blackhole bh) throws Exception {<FILL_FUNCTION_BODY>}

    @Benchmark
    public void hessian(Blackhole bh) throws Exception {
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        Hessian2Output hessian2Output = new Hessian2Output(byteArrayOutputStream);
        hessian2Output.writeObject(mc);
        hessian2Output.flush();
        bh.consume(byteArrayOutputStream.toByteArray());
    }

    public static void main(String[] args) throws RunnerException {
        Options options = new OptionsBuilder()
                .include(EishayWriteBinaryAutoType.class.getName())
                .mode(Mode.Throughput)
                .timeUnit(TimeUnit.MILLISECONDS)
                .warmupIterations(3)
                .forks(1)
                .threads(16)
                .build();
        new Runner(options).run();
    }
}

        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        ObjectOutputStream objectOutputStream = new ObjectOutputStream(byteArrayOutputStream);
        objectOutputStream.writeObject(mc);
        objectOutputStream.flush();
        bh.consume(byteArrayOutputStream.toByteArray());
    
<no_super_class>