Skip to content

Initial attempt at getApproximateCount for #205#311

Draft
kriszyp wants to merge 1 commit intomainfrom
getApproximateCount
Draft

Initial attempt at getApproximateCount for #205#311
kriszyp wants to merge 1 commit intomainfrom
getApproximateCount

Conversation

@kriszyp
Copy link
Member

@kriszyp kriszyp commented Jan 13, 2026

No description provided.

@github-actions
Copy link
Contributor

📊 Benchmark Results

get-sync.bench.ts

getSync() > random keys - small key size (100 records)

Implementation Rank Operations/sec Mean (ms) Min (ms) Max (ms) RME (%) Samples
🥇 lmdb 1 21.27K ops/sec 47.02 41.78 469.255 0.701 10,635
🥈 rocksdb 2 4.54K ops/sec 220.504 202.735 3,019.792 1.38 2,268

getSync() > sequential keys - small key size (100 records)

Implementation Rank Operations/sec Mean (ms) Min (ms) Max (ms) RME (%) Samples
🥇 lmdb 1 24.47K ops/sec 40.86 36.08 3,127.448 1.51 12,236
🥈 rocksdb 2 4.61K ops/sec 217.091 207.917 663.254 0.296 2,304

ranges.bench.ts

getRange() > small range (100 records, 50 range)

Implementation Rank Operations/sec Mean (ms) Min (ms) Max (ms) RME (%) Samples
🥇 lmdb 1 23.68K ops/sec 42.23 36.71 310.051 0.961 11,839
🥈 rocksdb 2 3.53K ops/sec 283.384 252.693 831.274 1.28 1,765

realistic-load.bench.ts

Realistic write load with workers > write variable records with transaction log

Implementation Rank Operations/sec Mean (ms) Min (ms) Max (ms) RME (%) Samples
🥇 rocksdb 1 181.75 ops/sec 5,502.1 71.20 163,893.347 47.01 384
🥈 lmdb 2 25.77 ops/sec 38,800.539 261.636 1,219,123.778 136.848 64.00

transaction-log.bench.ts

Transaction log > read 100 iterators while write log with 100 byte records

Implementation Rank Operations/sec Mean (ms) Min (ms) Max (ms) RME (%) Samples
🥇 rocksdb 1 36.07K ops/sec 27.73 13.68 1,020.745 0.804 18,034
🥈 lmdb 2 401.31 ops/sec 2,491.809 751.251 8,885.135 6.00 201

Transaction log > read one entry from random position from log with 1000 100 byte records

Implementation Rank Operations/sec Mean (ms) Min (ms) Max (ms) RME (%) Samples
🥇 rocksdb 1 613.66K ops/sec 1.63 1.41 375.54 0.367 306,831
🥈 lmdb 2 299.84K ops/sec 3.34 1.70 5,700.705 5.05 149,919

worker-put-sync.bench.ts

putSync() > random keys - small key size (100 records, 10 workers)

Implementation Rank Operations/sec Mean (ms) Min (ms) Max (ms) RME (%) Samples
🥇 rocksdb 1 862.87 ops/sec 1,158.929 984.252 3,345.207 0.506 1,726
🥈 lmdb 2 0.96 ops/sec 1,040,415.433 953,620.475 1,093,916.754 3.07 10.00

worker-transaction-log.bench.ts

Transaction log with workers > write log with 100 byte records

Implementation Rank Operations/sec Mean (ms) Min (ms) Max (ms) RME (%) Samples
🥇 rocksdb 1 18.61K ops/sec 53.74 30.87 6,008.841 0.838 37,216
🥈 lmdb 2 807.98 ops/sec 1,237.657 136.935 12,387.408 5.44 1,616

Results from commit 067c805

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant