Class HftLatencyBenchmark

java.lang.Object
com.quantfinlib.examples.HftLatencyBenchmark

public final class HftLatencyBenchmark extends Object
Self-contained benchmark of the HFT hot path with a realistic tick-to-signal workload on the consumer (streaming EMA crossover + RSI per tick).
  1. Throughput: blast ticks through the bus with backpressure spin and measure sustained ticks/second.
  2. 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 Details

    • HftLatencyBenchmark

      public HftLatencyBenchmark()
  • Method Details