11# RERUM Cache Metrics & Functionality Report
22
3- ** Generated** : Mon Oct 27 18:50:18 UTC 2025
3+ ** Generated** : Tue Oct 28 16:33:49 UTC 2025
44** Test Duration** : Full integration and performance suite
55** Server** : http://localhost:3001
66
4848
4949| Endpoint | Cold Cache (DB) | Warm Cache (Memory) | Speedup | Benefit |
5050| ----------| -----------------| ---------------------| ---------| ---------|
51- | ` /query ` | 348 | N/A | N/A | N/A |
52- | ` /search ` | 104 | N/A | N/A | N/A |
53- | ` /searchPhrase ` | 25 | N/A | N/A | N/A |
54- | ` /id ` | 412 | N/A | N/A | N/A |
55- | ` /history ` | 728 | N/A | N/A | N/A |
56- | ` /since ` | 873 | N/A | N/A | N/A |
51+ | ` /query ` | 328 | N/A | N/A | N/A |
52+ | ` /search ` | 146 | N/A | N/A | N/A |
53+ | ` /searchPhrase ` | 24 | N/A | N/A | N/A |
54+ | ` /id ` | 411 | N/A | N/A | N/A |
55+ | ` /history ` | 714 | N/A | N/A | N/A |
56+ | ` /since ` | 713 | N/A | N/A | N/A |
5757
5858** Interpretation** :
5959- ** Cold Cache** : First request hits database (cache miss)
7070| Endpoint | Empty Cache | Full Cache (1000 entries) | Overhead | Impact |
7171| ----------| -------------| ---------------------------| ----------| --------|
7272| ` /create ` | 23ms | 23ms | +0ms | ✅ Negligible |
73- | ` /update ` | 421ms | 437ms | +16ms | ⚠️ Moderate |
74- | ` /patch ` | 420ms | 424ms | +4ms | ✅ Negligible |
75- | ` /set ` | 431ms | 424ms | -7ms | ✅ None |
76- | ` /unset ` | 423ms | 423ms | +0ms | ✅ Negligible |
77- | ` /delete ` | 441ms | 460ms | +19ms | ⚠️ Moderate |
78- | ` /overwrite ` | 422ms | 421ms | -1ms | ✅ None |
73+ | ` /update ` | 420ms | 423ms | +3ms | ✅ Negligible |
74+ | ` /patch ` | 420ms | 433ms | +13ms | ⚠️ Moderate |
75+ | ` /set ` | 420ms | 422ms | +2ms | ✅ Negligible |
76+ | ` /unset ` | 435ms | 421ms | -14ms | ✅ None |
77+ | ` /delete ` | 437ms | 419ms | -18ms | ✅ None |
78+ | ` /overwrite ` | 450ms | 421ms | -29ms | ✅ None |
7979
8080** Interpretation** :
8181- ** Empty Cache** : Write with no cache to invalidate
9797- Net benefit on 1000 reads: ~ 0ms saved (assuming 70% hit rate)
9898
9999** Cache Costs (Writes)** :
100- - Average overhead per write: ~ 4ms
101- - Overhead percentage: ~ 1%
102- - Net cost on 1000 writes: ~ 4000ms
100+ - Average overhead per write: ~ -6ms
101+ - Overhead percentage: ~ - 1%
102+ - Net cost on 1000 writes: ~ -6000ms
103103- Tested endpoints: create, update, patch, set, unset, delete, overwrite
104104
105105** Break-Even Analysis** :
@@ -111,17 +111,17 @@ For a workload with:
111111
112112```
113113Without Cache:
114- 800 reads × 348ms = 278400ms
114+ 800 reads × 328ms = 262400ms
115115 200 writes × 23ms = 4600ms
116- Total: 283000ms
116+ Total: 267000ms
117117
118118With Cache:
119119 560 cached reads × 5ms = 2800ms
120- 240 uncached reads × 348ms = 83520ms
120+ 240 uncached reads × 328ms = 78720ms
121121 200 writes × 23ms = 4600ms
122- Total: 90920ms
122+ Total: 86120ms
123123
124- Net Improvement: 192080ms faster (~68% improvement)
124+ Net Improvement: 180880ms faster (~68% improvement)
125125```
126126
127127---
@@ -132,7 +132,7 @@ Net Improvement: 192080ms faster (~68% improvement)
132132
133133The cache layer provides:
1341341 . ** Significant read performance improvements** (0ms average speedup)
135- 2 . ** Minimal write overhead** (4ms average, ~ 1% of write time)
135+ 2 . ** Minimal write overhead** (-6ms average, ~ - 1% of write time)
1361363 . ** All endpoints functioning correctly** (37 passed tests)
137137
138138### 📊 Monitoring Recommendations
@@ -148,7 +148,7 @@ In production, monitor:
148148Current cache configuration:
149149- Max entries: 1000
150150- Max size: 1000000000 bytes
151- - TTL: 600 seconds
151+ - TTL: 86400 seconds
152152
153153Consider tuning based on:
154154- Workload patterns (read/write ratio)
@@ -176,6 +176,6 @@ Consider tuning based on:
176176
177177---
178178
179- ** Report Generated** : Mon Oct 27 18:50:18 UTC 2025
179+ ** Report Generated** : Tue Oct 28 16:33:49 UTC 2025
180180** Format Version** : 1.0
181181** Test Suite** : cache-metrics.sh
0 commit comments