Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a word about benchmarks and rename HttpServerBenchmark to HttpS…
…erverHandlerBenchmark to be more accurate
- Loading branch information
Showing
2 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
## Microbenchmarks | ||
|
||
A few JMH benchmarks are available to measure performance of some Vert.x sensistive parts. | ||
|
||
The benchmarks are executed with biased locking enabled. | ||
|
||
The benchmarks configures a JMH executor that uses `VertxThread`. | ||
|
||
Benchmarks are located in the `src/test/benchmarks` folder. | ||
|
||
### How-to | ||
|
||
Package the JMH microbenchmarks | ||
|
||
``` | ||
> mvn package -DskipTests -Pbenchmarks | ||
``` | ||
|
||
Run them all | ||
|
||
``` | ||
> java -jar target/vertx-core-$VERSION-benchmarks.jar | ||
``` | ||
|
||
### HttpHeaders benchmarks | ||
|
||
- `HeadersEncodeBenchmark`: encode HttpHeaders | ||
- `HeadersContainsBenchmarkv: HttpHeaders contains method | ||
- `HeadersSetBenchmark`: HttpHeaders set method | ||
|
||
``` | ||
> java -jar target/vertx-core-$VERSION-benchmarks.jar HeadersEncodeBenchmark | ||
``` | ||
|
||
### HttpServer handler benchmarks | ||
|
||
The `HttpServerHandlerBenchmark` benchmarks the `HttpServer` that deals with `HttpRequest` and `HttpResponse` | ||
objects. It mainly compares a simple _hello world_ application written with Vert.x and Netty. | ||
|
||
``` | ||
> java -jar target/vertx-core-$VERSION-benchmarks.jar HttpServerHandlerBenchmark | ||
``` | ||
|
||
### Context benchmarks | ||
|
||
The `RunOnContextBenchmark` measures the impact of the disabling thread checks, context timing that are done | ||
when running Vert.x context tasks. |
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