From d9ce1e1ad9a215c5f002807409a5f87d5c48a2a6 Mon Sep 17 00:00:00 2001 From: Thomas Korrison Date: Wed, 29 Apr 2026 09:49:30 +0100 Subject: [PATCH] docs: update benchmark charts and index for improved clarity and usability - Refactored `charts.html` to enhance the loading mechanism and improve the user experience for both JavaScript-enabled and disabled environments. - Updated the Content Security Policy (CSP) for better security compliance and maintainability. - Revised the benchmark index to improve the organization of policy performance metrics, ensuring a clearer comparison across different cache policies. - Enhanced documentation to reflect changes in the charts structure and benchmark results, facilitating better understanding for users. These updates improve the overall clarity and usability of benchmark results, making it easier for users to interpret performance metrics. --- docs/benchmarks/latest/charts.html | 565 ++++------------------------- docs/benchmarks/latest/index.md | 106 +++--- 2 files changed, 132 insertions(+), 539 deletions(-) diff --git a/docs/benchmarks/latest/charts.html b/docs/benchmarks/latest/charts.html index 97ae97c..0323847 100644 --- a/docs/benchmarks/latest/charts.html +++ b/docs/benchmarks/latest/charts.html @@ -1,141 +1,70 @@ - + + + + + + Cachekit Benchmark Charts + + + + - + integrity="sha384-9nhczxUqK87bcKHh20fSQcTGD4qq5GhayNYSYWqwBkINBhOfQLg/P5HG5lF1urn4" + crossorigin="anonymous" + referrerpolicy="no-referrer" + defer> +
@@ -145,9 +74,17 @@

πŸ“Š Cachekit Benchmark Charts

Loading benchmark data...
- + + + - - diff --git a/docs/benchmarks/latest/index.md b/docs/benchmarks/latest/index.md index 44ebc98..3d481c4 100644 --- a/docs/benchmarks/latest/index.md +++ b/docs/benchmarks/latest/index.md @@ -1,6 +1,6 @@ # Benchmark Results -**Quick Links**: [πŸ“Š Interactive Charts](charts.html) | [πŸ“ Raw JSON](results.json) +**Quick Links**: [Interactive Charts](charts.html) | [Raw JSON](results.json) --- @@ -23,68 +23,68 @@ ## Hit Rate Comparison -| Policy | Flash Crowd | HotSet 90/10 | Latest | Scan | Scan Resistance | Scrambled Zipfian | Uniform | Zipfian 1.0 | +| Policy | Uniform | HotSet 90/10 | Scan | Zipfian 1.0 | Scrambled Zipfian | Latest | Scan Resistance | Flash Crowd | |--------|-------:|-------:|-------:|-------:|-------:|-------:|-------:|-------:| -| **2Q** | 89.36% | 90.63% | 31.55% | 0.00% | 16.04% | 90.71% | 24.78% | 82.37% | -| **Clock** | 88.74% | 90.65% | 34.96% | 0.00% | 17.63% | 90.45% | 24.66% | 80.75% | -| **Clock-Pro** | 89.14% | 90.65% | 30.55% | 0.00% | 21.09% | 90.38% | 24.77% | 81.54% | -| **FIFO** | 86.74% | 86.16% | 35.49% | 0.00% | 15.58% | 87.58% | 24.64% | 76.77% | -| **Heap-LFU** | 85.32% | 90.67% | 26.51% | 22.52% | 23.42% | 90.03% | 24.67% | 74.81% | -| **LFU** | 89.40% | 90.64% | 25.82% | 0.00% | 20.28% | 91.13% | 24.61% | 82.57% | -| **LIFO** | 63.08% | 90.66% | 26.08% | 24.22% | 29.10% | 90.18% | 24.76% | 80.25% | -| **LRU** | 88.50% | 90.65% | 35.45% | 0.00% | 16.75% | 90.22% | 24.62% | 80.17% | -| **LRU-K** | 89.40% | 90.64% | 25.91% | 0.00% | 20.28% | 91.13% | 24.61% | 82.57% | -| **MFU** | 41.69% | 37.18% | 24.89% | 18.44% | 23.42% | 59.85% | 24.66% | 31.99% | -| **MRU** | 39.71% | 38.07% | 24.90% | 24.22% | 28.90% | 59.53% | 24.74% | 33.10% | -| **NRU** | 88.17% | 90.66% | 26.35% | 24.21% | 29.10% | 90.20% | 24.74% | 80.29% | -| **Random** | 86.84% | 86.34% | 32.85% | 1.82% | 20.72% | 87.70% | 24.66% | 76.98% | -| **S3-FIFO** | 89.48% | 90.63% | 30.35% | 0.00% | 23.18% | 90.95% | 24.73% | 82.49% | -| **SLRU** | 89.40% | 90.63% | 30.95% | 0.00% | 16.92% | 90.89% | 24.75% | 82.57% | +| **2Q** | 24.78% | 90.63% | 0.00% | 82.37% | 90.71% | 31.55% | 16.04% | 89.36% | +| **Clock** | 24.66% | 90.65% | 0.00% | 80.75% | 90.45% | 34.96% | 17.63% | 88.74% | +| **Clock-Pro** | 24.77% | 90.65% | 0.00% | 81.54% | 90.38% | 30.55% | 21.09% | 89.14% | +| **FIFO** | 24.64% | 86.16% | 0.00% | 76.77% | 87.58% | 35.49% | 15.58% | 86.74% | +| **Heap-LFU** | 24.67% | 90.67% | 22.52% | 74.81% | 90.03% | 26.51% | 23.42% | 85.32% | +| **LFU** | 24.61% | 90.64% | 0.00% | 82.57% | 91.13% | 25.82% | 20.28% | 89.40% | +| **LIFO** | 24.76% | 90.66% | 24.22% | 80.25% | 90.18% | 26.08% | 29.10% | 63.08% | +| **LRU** | 24.62% | 90.65% | 0.00% | 80.17% | 90.22% | 35.45% | 16.75% | 88.50% | +| **LRU-K** | 24.61% | 90.64% | 0.00% | 82.57% | 91.13% | 25.91% | 20.28% | 89.40% | +| **MFU** | 24.66% | 37.18% | 18.44% | 31.99% | 59.85% | 24.89% | 23.42% | 41.69% | +| **MRU** | 24.74% | 38.07% | 24.22% | 33.10% | 59.53% | 24.90% | 28.90% | 39.71% | +| **NRU** | 24.74% | 90.66% | 24.21% | 80.29% | 90.20% | 26.35% | 29.10% | 88.17% | +| **Random** | 24.66% | 86.34% | 1.82% | 76.98% | 87.70% | 32.85% | 20.72% | 86.84% | +| **S3-FIFO** | 24.73% | 90.63% | 0.00% | 82.49% | 90.95% | 30.35% | 23.18% | 89.48% | +| **SLRU** | 24.75% | 90.63% | 0.00% | 82.57% | 90.89% | 30.95% | 16.92% | 89.40% | ## Throughput (Million ops/sec) -| Policy | HotSet 90/10 | Uniform | Zipfian 1.0 | +| Policy | Uniform | HotSet 90/10 | Zipfian 1.0 | |--------|-------:|-------:|-------:| -| **2Q** | 11.71 | 16.21 | 8.41 | -| **Clock** | 11.51 | 12.39 | 7.92 | -| **Clock-Pro** | 12.21 | 10.01 | 8.01 | -| **FIFO** | 11.30 | 11.68 | 7.94 | -| **Heap-LFU** | 7.98 | 7.51 | 6.02 | -| **LFU** | 7.54 | 8.24 | 5.46 | -| **LIFO** | 14.05 | 20.50 | 9.45 | -| **LRU** | 11.15 | 15.48 | 8.24 | -| **LRU-K** | 9.41 | 11.33 | 7.15 | -| **MFU** | 9.86 | 10.47 | 7.85 | -| **MRU** | 15.13 | 16.86 | 11.04 | -| **NRU** | 12.92 | 0.68 | 7.22 | -| **Random** | 13.74 | 16.36 | 9.08 | -| **S3-FIFO** | 11.25 | 11.17 | 7.79 | -| **SLRU** | 11.71 | 16.17 | 8.42 | +| **2Q** | 16.21 | 11.71 | 8.41 | +| **Clock** | 12.39 | 11.51 | 7.92 | +| **Clock-Pro** | 10.01 | 12.21 | 8.01 | +| **FIFO** | 11.68 | 11.30 | 7.94 | +| **Heap-LFU** | 7.51 | 7.98 | 6.02 | +| **LFU** | 8.24 | 7.54 | 5.46 | +| **LIFO** | 20.50 | 14.05 | 9.45 | +| **LRU** | 15.48 | 11.15 | 8.24 | +| **LRU-K** | 11.33 | 9.41 | 7.15 | +| **MFU** | 10.47 | 9.86 | 7.85 | +| **MRU** | 16.86 | 15.13 | 11.04 | +| **NRU** | 0.68 | 12.92 | 7.22 | +| **Random** | 16.36 | 13.74 | 9.08 | +| **S3-FIFO** | 11.17 | 11.25 | 7.79 | +| **SLRU** | 16.17 | 11.71 | 8.42 | ## Latency P99 (nanoseconds) -| Policy | HotSet 90/10 | Uniform | Zipfian 1.0 | +| Policy | Uniform | HotSet 90/10 | Zipfian 1.0 | |--------|-------:|-------:|-------:| -| **2Q** | 80 | 130 | 101 | -| **Clock** | 150 | 200 | 171 | -| **Clock-Pro** | 210 | 321 | 291 | -| **FIFO** | 161 | 210 | 180 | -| **Heap-LFU** | 261 | 351 | 311 | -| **LFU** | 191 | 380 | 220 | -| **LIFO** | 61 | 81 | 80 | -| **LRU** | 90 | 130 | 111 | -| **LRU-K** | 150 | 201 | 160 | -| **MFU** | 201 | 220 | 210 | -| **MRU** | 100 | 130 | 101 | -| **NRU** | 160 | 10420 | 521 | -| **Random** | 100 | 130 | 120 | -| **S3-FIFO** | 151 | 231 | 200 | -| **SLRU** | 80 | 140 | 100 | +| **2Q** | 130 | 80 | 101 | +| **Clock** | 200 | 150 | 171 | +| **Clock-Pro** | 321 | 210 | 291 | +| **FIFO** | 210 | 161 | 180 | +| **Heap-LFU** | 351 | 261 | 311 | +| **LFU** | 380 | 191 | 220 | +| **LIFO** | 81 | 61 | 80 | +| **LRU** | 130 | 90 | 111 | +| **LRU-K** | 201 | 150 | 160 | +| **MFU** | 220 | 201 | 210 | +| **MRU** | 130 | 100 | 101 | +| **NRU** | 10420 | 160 | 521 | +| **Random** | 130 | 100 | 120 | +| **S3-FIFO** | 231 | 151 | 200 | +| **SLRU** | 140 | 80 | 100 | ## Scan Resistance | Policy | Baseline | During Scan | Recovery | Score | -|--------|----------|-------------|----------|-------| +|--------|---------:|------------:|---------:|------:| | **2Q** | 79.66% | 7.69% | 78.54% | 0.986 | | **Clock** | 79.66% | 6.90% | 68.54% | 0.860 | | **Clock-Pro** | 79.66% | 7.69% | 78.78% | 0.989 | @@ -101,12 +101,12 @@ | **S3-FIFO** | 79.66% | 7.69% | 78.82% | 0.989 | | **SLRU** | 79.66% | 7.69% | 78.54% | 0.986 | -*Score = Recovery/Baseline (1.0 = perfect recovery)* +*Score = Recovery/Baseline (1.0 = perfect recovery, n/a = baseline too low to compare)* ## Adaptation Speed | Policy | Stable Hit Rate | Ops to 50% | Ops to 80% | -|--------|-----------------|------------|------------| +|--------|----------------:|-----------:|-----------:| | **2Q** | 33.50% | 3072 | 11264 | | **Clock** | 49.32% | 3072 | 6144 | | **Clock-Pro** | 36.04% | 8192 | 11264 | @@ -139,4 +139,4 @@ --- -*Generated from `results.json` (schema v1.0.0)* +*Generated by `bench-support v0.1.0` from `results.json` (schema v1.0.0).*