parent
cd60a0013b
commit
5494d78018
|
@ -55,7 +55,7 @@ import static org.mockito.Mockito.verify;
|
||||||
*/
|
*/
|
||||||
class SqlQueryTests {
|
class SqlQueryTests {
|
||||||
|
|
||||||
//FIXME inline?
|
// FIXME inline?
|
||||||
private static final String SELECT_ID =
|
private static final String SELECT_ID =
|
||||||
"select id from custmr";
|
"select id from custmr";
|
||||||
private static final String SELECT_ID_WHERE =
|
private static final String SELECT_ID_WHERE =
|
||||||
|
|
|
@ -181,7 +181,7 @@ class ChannelSendOperator<T> extends Mono<Void> implements Scannable {
|
||||||
requiredWriteSubscriber().onNext(item);
|
requiredWriteSubscriber().onNext(item);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//FIXME revisit in case of reentrant sync deadlock
|
// FIXME revisit in case of reentrant sync deadlock
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
if (this.state == State.READY_TO_WRITE) {
|
if (this.state == State.READY_TO_WRITE) {
|
||||||
requiredWriteSubscriber().onNext(item);
|
requiredWriteSubscriber().onNext(item);
|
||||||
|
|
|
@ -74,8 +74,8 @@ public class HeadersAdapterBenchmark {
|
||||||
public MultiValueMap<String, String> headers;
|
public MultiValueMap<String, String> headers;
|
||||||
public Function<MultiValueMap<String, String>, Set<Map.Entry<String, List<String>>>> entriesProvider;
|
public Function<MultiValueMap<String, String>, Set<Map.Entry<String, List<String>>>> entriesProvider;
|
||||||
|
|
||||||
//Uncomment the following line and comment the similar line for setupImplementationBaseline below
|
// Uncomment the following line and comment the similar line for setupImplementationBaseline below
|
||||||
//to benchmark current implementations
|
// to benchmark current implementations
|
||||||
@Setup(Level.Trial)
|
@Setup(Level.Trial)
|
||||||
public void initImplementationNew() {
|
public void initImplementationNew() {
|
||||||
this.entriesProvider = map -> new HttpHeaders(map).headerSet();
|
this.entriesProvider = map -> new HttpHeaders(map).headerSet();
|
||||||
|
@ -85,7 +85,7 @@ public class HeadersAdapterBenchmark {
|
||||||
case "HttpComponents" -> new HttpComponentsHeadersAdapter(new HttpGet("https://example.com"));
|
case "HttpComponents" -> new HttpComponentsHeadersAdapter(new HttpGet("https://example.com"));
|
||||||
case "Netty5" -> new Netty5HeadersAdapter(io.netty5.handler.codec.http.headers.HttpHeaders.newHeaders());
|
case "Netty5" -> new Netty5HeadersAdapter(io.netty5.handler.codec.http.headers.HttpHeaders.newHeaders());
|
||||||
case "Jetty" -> new JettyHeadersAdapter(HttpFields.build());
|
case "Jetty" -> new JettyHeadersAdapter(HttpFields.build());
|
||||||
//FIXME tomcat/undertow implementations (in another package)
|
// FIXME tomcat/undertow implementations (in another package)
|
||||||
// case "Tomcat" -> new TomcatHeadersAdapter(new MimeHeaders());
|
// case "Tomcat" -> new TomcatHeadersAdapter(new MimeHeaders());
|
||||||
// case "Undertow" -> new UndertowHeadersAdapter(new HeaderMap());
|
// case "Undertow" -> new UndertowHeadersAdapter(new HeaderMap());
|
||||||
default -> throw new IllegalArgumentException("Unsupported implementation: " + this.implementation);
|
default -> throw new IllegalArgumentException("Unsupported implementation: " + this.implementation);
|
||||||
|
@ -93,8 +93,8 @@ public class HeadersAdapterBenchmark {
|
||||||
initHeaders();
|
initHeaders();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Uncomment the following line and comment the similar line for setupImplementationNew above
|
// Uncomment the following line and comment the similar line for setupImplementationNew above
|
||||||
//to benchmark old implementations
|
// to benchmark old implementations
|
||||||
// @Setup(Level.Trial)
|
// @Setup(Level.Trial)
|
||||||
public void setupImplementationBaseline() {
|
public void setupImplementationBaseline() {
|
||||||
this.entriesProvider = MultiValueMap::entrySet;
|
this.entriesProvider = MultiValueMap::entrySet;
|
||||||
|
|
|
@ -173,7 +173,7 @@ public class ChannelSendOperator<T> extends Mono<Void> implements Scannable {
|
||||||
requiredWriteSubscriber().onNext(item);
|
requiredWriteSubscriber().onNext(item);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//FIXME revisit in case of reentrant sync deadlock
|
// FIXME revisit in case of reentrant sync deadlock
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
if (this.state == State.READY_TO_WRITE) {
|
if (this.state == State.READY_TO_WRITE) {
|
||||||
requiredWriteSubscriber().onNext(item);
|
requiredWriteSubscriber().onNext(item);
|
||||||
|
|
Loading…
Reference in New Issue