ssbc / ssb-db2

A new database for secure-scuttlebutt
47 stars 8 forks source link

add code coverage #329

Closed staltz closed 2 years ago

staltz commented 2 years ago

@arj03 This coverage allowed me to check that we don't have currently tests for reindexOffset, and that it seems like we need to update the implementation anyway, because it calls processRecord (not onRecord) and doesn't pass pValue. I'll work on that next.

github-actions[bot] commented 2 years ago

Benchmark results

Part Duration
add 1000 elements 483ms
add 1000 private box1 elements 1194ms
unbox 1000 private box1 elements first run 124ms
unbox 1000 private box1 elements second run 87ms
add 1000 private box1 elements 1187ms
query 1000 elements first run 38ms
query 1000 elements second run 15ms
add 1000 private box2 elements 588ms
unbox 1000 private box2 elements first run 340ms
unbox 1000 private box2 elements second run 329ms
Migrate (+db1) 10708ms
Migrate (alone) 3344ms
Migrate (+db1 +db2) 7960ms
Migrate (+db2) 5425ms
Migrate continuation (+db2) 956ms
Memory usage without indexes 743.62 MB = 31.20 MB + etc
Initial indexing 572ms
Initial indexing maxCpu=86 2642ms
Initial indexing compat 708ms
Two indexes updating concurrently 759ms
key one initial 46ms
key two 2ms
key one again 2ms
reboot and key one again 46ms
latest root posts 528ms
latest posts 20ms
votes one initial 447ms
votes again 1ms
hasRoot 332ms
hasRoot again 0ms
author one posts 250ms
author two posts 18ms
dedicated author one posts 303ms
dedicated author one posts again 1ms
Maximum memory usage 882.36 MB = 53.33 MB + etc
Indexes folder size 12.76mb
github-actions[bot] commented 2 years ago

Benchmark results

Part Duration
add 1000 elements 505ms
add 1000 private box1 elements 1464ms
unbox 1000 private box1 elements first run 171ms
unbox 1000 private box1 elements second run 119ms
add 1000 private box1 elements 1471ms
query 1000 elements first run 38ms
query 1000 elements second run 18ms
add 1000 private box2 elements 801ms
unbox 1000 private box2 elements first run 404ms
unbox 1000 private box2 elements second run 411ms
Migrate (+db1) 15633ms
Migrate (alone) 4866ms
Migrate (+db1 +db2) 10994ms
Migrate (+db2) 7846ms
Migrate continuation (+db2) 1458ms
Memory usage without indexes 731.57 MB = 28.86 MB + etc
Initial indexing 766ms
Initial indexing maxCpu=86 3624ms
Initial indexing compat 880ms
Two indexes updating concurrently 907ms
key one initial 68ms
key two 2ms
key one again 2ms
reboot and key one again 54ms
latest root posts 731ms
latest posts 17ms
votes one initial 533ms
votes again 1ms
hasRoot 363ms
hasRoot again 2ms
author one posts 340ms
author two posts 18ms
dedicated author one posts 359ms
dedicated author one posts again 1ms
Maximum memory usage 869.65 MB = 49.20 MB + etc
Indexes folder size 12.87mb