Skip to content

Commit 9c73f89

Browse files
committed
chore: add global benchmarks
1 parent e10379d commit 9c73f89

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

benchmarks/README.md

+21
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,27 @@ And, maybe not super-fair because `cache-manager` does not support it, but here
3838
└─────────┴────────────────┴─────────────────────┴────────────────────┴────────────────────────┴────────────────────────┴─────────┘
3939
```
4040

41+
## Global results
42+
43+
`all.ts` file.
44+
45+
```sh
46+
┌─────────┬──────────────────────────────────┬─────────────────────┬─────────────────────┬────────────────────────┬────────────────────────┬─────────┐
47+
│ (index) │ Task name │ Latency avg (ns) │ Latency med (ns) │ Throughput avg (ops/s) │ Throughput med (ops/s) │ Samples │
48+
├─────────┼──────────────────────────────────┼─────────────────────┼─────────────────────┼────────────────────────┼────────────────────────┼─────────┤
49+
│ 0 │ 'L1 GetOrSet - BentoCache''16613 ± 97.87%''1560.0 ± 45.00''613098 ± 0.10%''641026 ± 19040' │ 83796 │
50+
│ 1 │ 'L1 GetOrSet - CacheManager''953451 ± 111.03%''160022 ± 3815.00''5700 ± 1.23%''6249 ± 151' │ 1049 │
51+
│ 2 │ 'L2 GetOrSet - BentoCache''2660684 ± 111.50%''511258 ± 18657.00''1913 ± 1.11%''1956 ± 73' │ 376 │
52+
│ 3 │ 'L2 GetOrSet - CacheManager''3425710 ± 111.41%''663346 ± 25252.50''1475 ± 1.32%''1508 ± 59' │ 292 │
53+
│ 4 │ 'Tiered GetOrSet - BentoCache''16105 ± 98.11%''1515.0 ± 45.00''636621 ± 0.08%''660066 ± 20206' │ 86675 │
54+
│ 5 │ 'Tiered GetOrSet - CacheManager''877297 ± 111.36%''161617 ± 2876.00''5948 ± 0.67%''6187 ± 112' │ 1140 │
55+
│ 6 │ 'Tiered Get - BentoCache''1542.4 ± 4.43%''992.00 ± 18.00''973931 ± 0.03%''1008065 ± 17966' │ 648343 │
56+
│ 7 │ 'Tiered Get - CacheManager''1957.6 ± 0.51%''1848.0 ± 26.00''534458 ± 0.02%''541126 ± 7722' │ 510827 │
57+
│ 8 │ 'Tiered Set - BentoCache''448755 ± 0.39%''440138 ± 14165.00''2242 ± 0.29%''2272 ± 74' │ 2229 │
58+
│ 9 │ 'Tiered Set - CacheManager''436970 ± 0.50%''429116 ± 13100.00''2305 ± 0.29%''2330 ± 72' │ 2289 │
59+
└─────────┴──────────────────────────────────┴─────────────────────┴─────────────────────┴────────────────────────┴────────────────────────┴─────────┘
60+
```
61+
4162
Please if you see any mistake in the benchmarks, open an issue and I will correct it.
4263

4364
- Run: 02/02/2025

benchmarks/all.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ await bench
9797
return result ?? 'value'
9898
})
9999
.add('Tiered Get - BentoCache', async () => {
100-
const result = bentocacheTiered.get({ key: 'bento:foo' })
100+
const result = await bentocacheTiered.get({ key: 'bento:foo' })
101101
if (!result) await bentocacheTiered.set({ key: 'bento:foo', value: 'value', ttl: '10s' })
102102
})
103103
.add('Tiered Get - CacheManager', async () => {
104-
const result = cacheManagerTiered.get('cm:barbar')
104+
const result = await cacheManagerTiered.get('cm:barbar')
105105
if (!result) await cacheManagerTiered.set('cm:barbar', 'value', 10_000)
106106
})
107107
.add('Tiered Set - BentoCache', async () => {

0 commit comments

Comments
 (0)