jetty-project / jetty-load-generator

Home Page:https://jetty-project.github.io/jetty-load-generator/

Repository from Github https://github.comjetty-project/jetty-load-generatorRepository from Github https://github.comjetty-project/jetty-load-generator

Add a way to easily configure a ByteBufferPool

lorban opened this issue · comments

The LoadGenerator.Builder currently lacks an easy way to set a ByteBufferPool, something like the following:

LoadGenerator.builder()
    .byteBufferPool(bufferPool)
...

Currently the only way to set the byte buffer pool is by configuring a httpClientTransportBuilder which requires:

  • 9.4.x: overriding the HTTPClientTransportBuilder's build() method to create a HttpClient and set the byte buffer pool on it.
  • 10/11: overriding the HTTPClientTransportBuilder's getConnector() method to return a custom ClientConnector that has the byte buffer pool set on it. This has the side effect of ignoring the LoadGenerator.Builder's configured sslContextFactory which must be manually set on the custom ClientConnector.

None of this is straightforward nor easy to remember.