This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am jkeys089 on github. | |
* I am jkeys (https://keybase.io/jkeys) on keybase. | |
* I have a public key whose fingerprint is D856 2F32 F265 7CA0 6257 5A80 73F4 9C92 9FC8 19CC | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.t12y.benchmarks; | |
import io.netty.util.internal.StringUtil; | |
import java.util.regex.Pattern; | |
import org.openjdk.jmh.annotations.GenerateMicroBenchmark; | |
public class PreCompiledRegexVsNettyStringUtil { | |
private static final Pattern SINGLE_SPACE_PATTERN = Pattern.compile(" "); | |
private static final String PROXY_PROTOCOL_STRING = "PROXY TCP4 192.168.0.1 192.168.0.11 56324 443"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.allanbank.mongodb.*; | |
import com.allanbank.mongodb.bson.Document; | |
import com.allanbank.mongodb.builder.*; | |
import com.allanbank.mongodb.bson.builder.*; | |
import java.util.concurrent.*; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class AsyncFindBlockingTest { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void testResponseBodyWriteFixedString() { | |
final String body = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."; | |
final Buffer bodyBuff = new Buffer(body); | |
AsyncResultHandler<HttpServer> handler = new AsyncResultHandler<HttpServer>() { | |
@Override | |
public void handle(AsyncResult<HttpServer> ar) { | |
tu.azzert(ar.succeeded()); | |
final HttpClientRequest req = getRequest(true, "GET", "some-uri", new Handler<HttpClientResponse>() { |