code: public static void runWith(
        String[] args, Function<BenchmarkSettings, SmCodecBenchmarkState> benchmarkStateFactory) {
  
      BenchmarkSettings settings =
          BenchmarkSettings.from(args).durationUnit(TimeUnit.NANOSECONDS).build();
  
      SmCodecBenchmarkState benchmarkState = benchmarkStateFactory.apply(settings);
  
      benchmarkState.runForSync(
          state -> {
            BenchmarkTimer timer = state.timer("timer");
            BenchmarkMeter meter = state.meter("meter");
            ServiceMessageCodec messageCodec = state.messageCodec();
            Class<?> dataType = state.dataType();
  
            return i -> {
              Context timeContext = timer.time();
              ByteBuf dataBuffer = state.dataBuffer().retain();
              ByteBuf headersBuffer = state.headersBuffer().retain();
              ServiceMessage message =
                  ServiceMessageCodec.decodeData(
                      messageCodec.decode(dataBuffer, headersBuffer), dataType);
              timeContext.stop();
              meter.mark();
              return message;
            };
          });
    }
docs: Runner function for benchmarks.
  
  @param args program arguments
  @param benchmarkStateFactory producer function for {@link BenchmarkState}