Skip to content

Commit

Permalink
adding benchmark for each id implementation (#104)
Browse files Browse the repository at this point in the history
* adding benchmark for each id implementation

* deleting unneccesary png files

* adding benchmark details in readme.md

* updating readme

* updating readme

* restructuring folder
  • Loading branch information
nsahai8 authored and ashishagg committed May 15, 2019
1 parent 3159432 commit 45fd4a2
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,5 @@ In case your apps are already wired in with some kind of instrumentation library
## License
This project is licensed under the Apache License v2.0 - see the LICENSE.txt file for details.

## Benchmarks
We have published our benchmarks [here](benchmark/README.md)
27 changes: 27 additions & 0 deletions benchmark/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Benchmarks


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.
We have benchmark the performance of client with each Id Generator Implementations:

### Using Long-ID Implementation
![Long-ID Implementation](images/longIDjmhvisulaizer.png)

### Using Random-UUID-ID Implementation
![Long-ID Implementation](images/randomuuid.png)

### Using TimeBased-UUID-ID Implementation
![Long-ID Implementation](images/timebaseduuid.png)


## To Measure Performance of client

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.
Run the following commands (inside on this specific project)

```bash
mvn clean install
java -jar target/benchmarks.jar
```

Once you are done. Use [JMH-visualizer(Online version)](http://jmh.morethan.io/) to present the benchmark results.
Binary file added benchmark/images/longIDjmhvisulaizer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added benchmark/images/randomuuid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added benchmark/images/timebaseduuid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 45fd4a2

Please sign in to comment.