Skip to content

Commit 45fd4a2

Browse files
nsahai8ashishagg
authored andcommitted
adding benchmark for each id implementation (#104)
* adding benchmark for each id implementation * deleting unneccesary png files * adding benchmark details in readme.md * updating readme * updating readme * restructuring folder
1 parent 3159432 commit 45fd4a2

File tree

5 files changed

+29
-0
lines changed

5 files changed

+29
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,5 @@ In case your apps are already wired in with some kind of instrumentation library
6060
## License
6161
This project is licensed under the Apache License v2.0 - see the LICENSE.txt file for details.
6262

63+
## Benchmarks
64+
We have published our benchmarks [here](benchmark/README.md)

benchmark/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Benchmarks
2+
3+
4+
One of the deciding factor for performance of haystack client is the Id Generation Process.There are more than one way to implement the Id generator for traces and spans. We have added three implementations : LongId Generator(Default), RandomUUID Generator, TimeBasedUUID Generator. The Id Generators were implemented based on uniqueness and performance.For eg: Long ID Generator will give you less assurance for uniqueness as compared to UUID implementations, while the performance of Long ID generator will better. You are also free to add your own ID generator implementations.
5+
We have benchmark the performance of client with each Id Generator Implementations:
6+
7+
### Using Long-ID Implementation
8+
![Long-ID Implementation](images/longIDjmhvisulaizer.png)
9+
10+
### Using Random-UUID-ID Implementation
11+
![Long-ID Implementation](images/randomuuid.png)
12+
13+
### Using TimeBased-UUID-ID Implementation
14+
![Long-ID Implementation](images/timebaseduuid.png)
15+
16+
17+
## To Measure Performance of client
18+
19+
To measure the performance of the client, you would need to clone: https://github.com/gsoria/opentracing-java-benchmark/tree/master/opentracing-benchmark-simple-java. Once this is complete, update haystack.version in pom.xml with the current version of your haystack client.
20+
Run the following commands (inside on this specific project)
21+
22+
```bash
23+
mvn clean install
24+
java -jar target/benchmarks.jar
25+
```
26+
27+
Once you are done. Use [JMH-visualizer(Online version)](http://jmh.morethan.io/) to present the benchmark results.
244 KB
Loading

benchmark/images/randomuuid.png

228 KB
Loading

benchmark/images/timebaseduuid.png

229 KB
Loading

0 commit comments

Comments
 (0)