Class HftLatencyBenchmark
java.lang.Object
com.quantfinlib.examples.HftLatencyBenchmark
Self-contained benchmark of the HFT hot path with a realistic tick-to-signal
workload on the consumer (streaming EMA crossover + RSI per tick).
- Throughput: blast ticks through the bus with backpressure spin and measure sustained ticks/second.
- Hand-off latency: paced one-in-flight ticks; records
publish-to-strategy latency percentiles (
System.nanoTime()at publish, measured inside the strategy callback).
Run with: java -cp target/classes com.quantfinlib.examples.HftLatencyBenchmark
(add -XX:+UseZGC -Xms1g -Xmx1g -XX:+AlwaysPreTouch for production-like jitter).
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
HftLatencyBenchmark
public HftLatencyBenchmark()
-
-
Method Details
-
main
-