Class L4CacheBenchmark

java.lang.Object
com.helix.experiments.benchmarks.L4CacheBenchmark
Direct Known Subclasses:
L4CacheBenchmark_jmhType_B1

public class L4CacheBenchmark extends Object
JMH Microbenchmark suite comparing: 1. L1 Caffeine in-memory cache hit (<12 ns) 2. L4 Redis distributed cache hit (<450 us over loopback TCP) 3. Cold ASM rule compilation (~250 us)
  • Constructor Details

    • L4CacheBenchmark

      public L4CacheBenchmark()
  • Method Details

    • setup

      public void setup() throws Exception
      Throws:
      Exception
    • tearDown

      public void tearDown()
    • benchmarkL1CaffeineCacheHit

      public CompiledRule benchmarkL1CaffeineCacheHit()
      Measures L1 Caffeine in-memory cache hit latency (<12 ns).
    • benchmarkTieredCacheL1Hit

      public Optional<CompiledRule> benchmarkTieredCacheL1Hit()
      Measures TieredRuleCache L1 hit latency.
    • benchmarkL4RedisCacheHit

      public Optional<byte[]> benchmarkL4RedisCacheHit()
      Measures L4 Redis distributed cache retrieval latency (<450 us over loopback TCP).
    • benchmarkColdAsmRuleCompilation

      public CompiledRule benchmarkColdAsmRuleCompilation() throws Exception
      Measures cold ASM rule compilation latency (~250 us).
      Throws:
      Exception
    • getL1Cache

      public com.github.benmanes.caffeine.cache.Cache<CacheKey,CompiledRule> getL1Cache()
    • getL4RedisCache

      public L4RedisRuleCache getL4RedisCache()
    • getRuleHash

      public String getRuleHash()