diff --git a/README.md b/README.md index bef1611..88a6d00 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/benchmark/README.md b/benchmark/README.md new file mode 100644 index 0000000..5c322c5 --- /dev/null +++ b/benchmark/README.md @@ -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. diff --git a/benchmark/images/longIDjmhvisulaizer.png b/benchmark/images/longIDjmhvisulaizer.png new file mode 100644 index 0000000..91498be Binary files /dev/null and b/benchmark/images/longIDjmhvisulaizer.png differ diff --git a/benchmark/images/randomuuid.png b/benchmark/images/randomuuid.png new file mode 100644 index 0000000..e87baa1 Binary files /dev/null and b/benchmark/images/randomuuid.png differ diff --git a/benchmark/images/timebaseduuid.png b/benchmark/images/timebaseduuid.png new file mode 100644 index 0000000..999eecc Binary files /dev/null and b/benchmark/images/timebaseduuid.png differ