Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Rework update and delete node to remove secondary planner #571

Merged
merged 5 commits into from
Jun 30, 2022

Conversation

AndrewSisley
Copy link
Contributor

@AndrewSisley AndrewSisley commented Jun 29, 2022

Relevant issue(s)

Resolves #534

Description

Fixes an explain test that was incorrectly updating test data. Fixes (and tests) a bug in select where providing an empty collection of ids would result in the full collection being returned. Reworks delete and update node to remove some circular logic.

Recommend reviewing commit by commit.
PROPOSAL/FIXUP - Amends spans to properly handle explicitly empty spans improves upon (IMO) the somewhat hacky fix in Correctly handle empty collection of ids in selects, but is a bit more complex - might want to review those commits together depending on preference.

Update and delete are not benchmarked, however I would expect gains in delete, unsure about update as there remains some inefficiency there. Performance not a goal of this PR though.

Note: Code coverage of collection.delete/update has dropped significantly as the collection abi is extremely poorly tested, and previously gained some coverage due to the unusual code paths taken prior to this PR.

Tasks

  • I made sure the code is well commented, particularly hard-to-understand areas.
  • I made sure the repository-held documentation is changed accordingly.
  • I made sure the pull request title adheres to the conventional commit style (the subset used in the project can be found in tools/configs/chglog/config.yml).
  • I made sure to discuss its limitations such as threats to validity, vulnerability to mistake and misuse, robustness to invalidation of assumptions, resource requirements, ...
  • Squash or drop Amends spans to properly... before merge depending on reviewer feedback

Specify the platform(s) on which this was tested:

  • Debian Linux

@AndrewSisley AndrewSisley added bug Something isn't working area/query Related to the query component refactor This issue specific to or requires *notable* refactoring of existing codebases and components labels Jun 29, 2022
@AndrewSisley AndrewSisley requested a review from a team June 29, 2022 15:43
@AndrewSisley AndrewSisley self-assigned this Jun 29, 2022
@codecov
Copy link

codecov bot commented Jun 29, 2022

Codecov Report

Merging #571 (6e3701c) into develop (bab8bd3) will decrease coverage by 1.13%.
The diff coverage is 77.53%.

❗ Current head 6e3701c differs from pull request most recent head bf9b8e6. Consider uploading reports for the commit bf9b8e6 to get more accurate results

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #571      +/-   ##
===========================================
- Coverage    56.98%   55.84%   -1.14%     
===========================================
  Files          121      121              
  Lines        14243    14169      -74     
===========================================
- Hits          8116     7913     -203     
- Misses        5413     5558     +145     
+ Partials       714      698      -16     
Impacted Files Coverage Δ
query/graphql/mapper/targetable.go 50.00% <ø> (-37.50%) ⬇️
db/fetcher/dag.go 56.79% <50.00%> (ø)
query/graphql/planner/delete.go 71.66% <60.60%> (-11.17%) ⬇️
query/graphql/planner/update.go 71.59% <62.50%> (-3.41%) ⬇️
db/fetcher/versioned.go 52.35% <66.66%> (ø)
db/fetcher/fetcher.go 60.69% <80.00%> (-0.35%) ⬇️
query/graphql/planner/dagscan.go 73.65% <81.81%> (+0.43%) ⬆️
query/graphql/planner/select.go 75.00% <83.33%> (-1.18%) ⬇️
core/data.go 89.11% <100.00%> (+0.38%) ⬆️
db/collection_get.go 50.00% <100.00%> (ø)
... and 21 more

@AndrewSisley AndrewSisley force-pushed the sisley/refactor/I534-update-delete-node branch 2 times, most recently from 36e3f76 to 24880e6 Compare June 29, 2022 16:06
@AndrewSisley AndrewSisley added the action/no-benchmark Skips the action that runs the benchmark. label Jun 29, 2022
@source-devs
Copy link

Benchmark Results

Summary

  • 113 Benchmarks successfully compared.
  • 16 Benchmarks were ✅ Better.
  • 97 Benchmarks were ❌ Worse .
  • 0 Benchmarks were ✨ Unchanged.
✅ See Better Results...
time/opdelta
_Collection_UserSimple_Create_Async_0_1000-4459ms ± 0%455ms ± 0%−0.98%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_10_10-4361µs ± 0%359µs ± 0%−0.54%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_10-4374µs ± 0%368µs ± 0%−1.52%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_100-44.33ms ± 0%4.13ms ± 0%−4.64%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_10_10-4320µs ± 0%313µs ± 0%−2.23%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_100_100-42.49ms ± 0%1.91ms ± 0%−23.32%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_1000-428.4ms ± 0%24.5ms ± 0%−13.91%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_10-4335µs ± 0%270µs ± 0%−19.52%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_100-42.58ms ± 0%1.87ms ± 0%−27.63%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_1000-410.0ms ± 0%9.9ms ± 0%−0.79%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_1000-4470µs ± 0%455µs ± 0%−3.06%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_100-4695µs ± 0%681µs ± 0%−2.10%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_1000-4308µs ± 0%305µs ± 0%−1.09%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_100-41.43ms ± 0%1.26ms ± 0%−11.76%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_1000-49.85ms ± 0%9.75ms ± 0%−1.01%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0256-461.6µs ± 0%61.5µs ± 0%−0.28%(p=1.000 n=1+1)
 
❌ See Worse Results...
time/opdelta
_Collection_UserSimple_CreateMany_Sync_0_100-4226ms ± 0%258ms ± 0%+14.14%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_10-410.5ms ± 0%13.7ms ± 0%+31.31%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_100-4100ms ± 0%124ms ± 0%+23.67%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_1000-41.02s ± 0%1.14s ± 0%+10.84%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_100-446.3ms ± 0%47.4ms ± 0%+2.53%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_10000-44.65s ± 0%4.71s ± 0%+1.26%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_100_100-43.71ms ± 0%4.11ms ± 0%+10.97%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_1000-440.9ms ± 0%41.7ms ± 0%+1.88%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_100-41.23ms ± 0%1.40ms ± 0%+13.70%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_10-4465µs ± 0%494µs ± 0%+6.08%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_100-41.30ms ± 0%1.40ms ± 0%+7.43%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_1000-49.87ms ± 0%10.12ms ± 0%+2.55%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_10-4425µs ± 0%545µs ± 0%+28.19%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_100-4481µs ± 0%488µs ± 0%+1.53%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_10-4675µs ± 0%701µs ± 0%+3.80%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_1000-4692µs ± 0%692µs ± 0%+0.08%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_10-4317µs ± 0%368µs ± 0%+15.80%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_100-4315µs ± 0%342µs ± 0%+8.42%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_10-4442µs ± 0%471µs ± 0%+6.56%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0128-413.4µs ± 0%15.4µs ± 0%+14.67%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0256-414.5µs ± 0%18.1µs ± 0%+24.91%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0512-415.8µs ± 0%18.1µs ± 0%+14.55%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:1024-419.9µs ± 0%22.5µs ± 0%+12.95%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0064-4130µs ± 0%140µs ± 0%+7.69%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0128-4129µs ± 0%153µs ± 0%+18.41%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0256-4151µs ± 0%161µs ± 0%+6.67%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0512-4156µs ± 0%189µs ± 0%+21.10%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:1024-4197µs ± 0%256µs ± 0%+30.03%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0064-414.8µs ± 0%16.0µs ± 0%+8.25%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0128-414.7µs ± 0%17.8µs ± 0%+20.84%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0256-415.4µs ± 0%17.9µs ± 0%+16.46%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0512-417.2µs ± 0%20.5µs ± 0%+19.12%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:1024-420.7µs ± 0%22.0µs ± 0%+6.25%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0064-4140µs ± 0%150µs ± 0%+7.20%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0128-4140µs ± 0%166µs ± 0%+18.47%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0256-4147µs ± 0%166µs ± 0%+12.33%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0512-4162µs ± 0%204µs ± 0%+25.26%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:1024-4197µs ± 0%257µs ± 0%+30.73%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0064-451.3µs ± 0%70.1µs ± 0%+36.49%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0128-454.0µs ± 0%57.9µs ± 0%+7.22%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0512-456.2µs ± 0%67.2µs ± 0%+19.65%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:1024-470.9µs ± 0%73.0µs ± 0%+3.00%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0064-4382µs ± 0%505µs ± 0%+32.26%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0128-4387µs ± 0%459µs ± 0%+18.56%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0256-4408µs ± 0%512µs ± 0%+25.41%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0512-4413µs ± 0%460µs ± 0%+11.44%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:1024-4496µs ± 0%600µs ± 0%+21.09%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0064-447.1µs ± 0%51.7µs ± 0%+9.86%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0128-445.8µs ± 0%56.4µs ± 0%+23.08%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0256-448.5µs ± 0%56.2µs ± 0%+15.85%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0512-454.3µs ± 0%64.8µs ± 0%+19.45%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:1024-465.2µs ± 0%79.8µs ± 0%+22.49%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0064-4347µs ± 0%462µs ± 0%+32.91%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0128-4358µs ± 0%427µs ± 0%+19.31%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0256-4370µs ± 0%507µs ± 0%+37.20%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0512-4410µs ± 0%536µs ± 0%+30.71%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:1024-4488µs ± 0%540µs ± 0%+10.62%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0064-4123µs ± 0%136µs ± 0%+11.02%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0128-4126µs ± 0%152µs ± 0%+20.44%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0256-4128µs ± 0%135µs ± 0%+5.66%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0512-4142µs ± 0%153µs ± 0%+8.22%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:1024-4147µs ± 0%179µs ± 0%+21.65%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0064-41.25ms ± 0%1.31ms ± 0%+4.94%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0128-41.27ms ± 0%1.32ms ± 0%+4.25%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0256-41.27ms ± 0%1.38ms ± 0%+8.39%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0512-41.30ms ± 0%1.61ms ± 0%+24.15%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:1024-41.43ms ± 0%1.68ms ± 0%+17.42%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0064-4118µs ± 0%138µs ± 0%+16.58%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0128-4131µs ± 0%135µs ± 0%+3.20%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0256-4121µs ± 0%141µs ± 0%+16.33%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0512-4131µs ± 0%135µs ± 0%+3.49%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:1024-4136µs ± 0%142µs ± 0%+4.53%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0064-41.19ms ± 0%1.23ms ± 0%+3.30%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0128-41.18ms ± 0%1.27ms ± 0%+7.59%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0256-41.19ms ± 0%1.45ms ± 0%+21.95%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0512-41.25ms ± 0%1.42ms ± 0%+14.18%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:1024-41.44ms ± 0%1.54ms ± 0%+7.37%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0064-48.87µs ± 0%9.12µs ± 0%+2.91%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0128-48.79µs ± 0%10.47µs ± 0%+19.11%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0256-49.59µs ± 0%11.47µs ± 0%+19.55%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0512-411.3µs ± 0%13.5µs ± 0%+19.47%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:1024-415.4µs ± 0%17.4µs ± 0%+13.17%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0064-491.7µs ± 0%95.7µs ± 0%+4.44%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0128-4101µs ± 0%149µs ± 0%+48.24%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0256-4102µs ± 0%111µs ± 0%+9.13%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0512-4116µs ± 0%154µs ± 0%+32.90%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:1024-4166µs ± 0%213µs ± 0%+27.92%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0064-4121µs ± 0%138µs ± 0%+14.42%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0128-4121µs ± 0%134µs ± 0%+10.38%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0256-4124µs ± 0%133µs ± 0%+7.57%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0512-4122µs ± 0%145µs ± 0%+18.49%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:1024-4124µs ± 0%129µs ± 0%+3.71%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0064-41.22ms ± 0%1.35ms ± 0%+10.39%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0128-41.24ms ± 0%1.33ms ± 0%+7.21%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0256-41.16ms ± 0%1.29ms ± 0%+11.91%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0512-41.22ms ± 0%1.42ms ± 0%+16.47%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:1024-41.28ms ± 0%1.36ms ± 0%+6.29%(p=1.000 n=1+1)
 
✨ See Unchanged Results...
time/opdelta
 
🐋 See Full Results...
develop.txtcurrent.txt
time/opdelta
pkg:collection goos:linux goarch:amd64
_Collection_UserSimple_CreateMany_Sync_0_10-411.1ms ± 0%11.2ms ± 0%+1.31%(p=1.000 n=1+1)
_Collection_UserSimple_CreateMany_Sync_0_100-4226ms ± 0%258ms ± 0%+14.14%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_10-410.5ms ± 0%13.7ms ± 0%+31.31%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_100-4100ms ± 0%124ms ± 0%+23.67%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_1000-41.02s ± 0%1.14s ± 0%+10.84%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_100-446.3ms ± 0%47.4ms ± 0%+2.53%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_1000-4459ms ± 0%455ms ± 0%−0.98%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_10000-44.65s ± 0%4.71s ± 0%+1.26%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_10_10-4361µs ± 0%359µs ± 0%−0.54%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_100_100-43.71ms ± 0%4.11ms ± 0%+10.97%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_1000-440.9ms ± 0%41.7ms ± 0%+1.88%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_10-4374µs ± 0%368µs ± 0%−1.52%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_100-44.33ms ± 0%4.13ms ± 0%−4.64%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_10_10-4320µs ± 0%313µs ± 0%−2.23%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_100_100-42.49ms ± 0%1.91ms ± 0%−23.32%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_1000-428.4ms ± 0%24.5ms ± 0%−13.91%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_10-4335µs ± 0%270µs ± 0%−19.52%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_100-42.58ms ± 0%1.87ms ± 0%−27.63%(p=1.000 n=1+1)
pkg:query/simple goos:linux goarch:amd64
_Query_UserSimple_Query_Sync_10-4391µs ± 0%369µs ± 0%−5.77%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_100-41.23ms ± 0%1.40ms ± 0%+13.70%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_1000-410.0ms ± 0%9.9ms ± 0%−0.79%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_10-4465µs ± 0%494µs ± 0%+6.08%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_100-41.30ms ± 0%1.40ms ± 0%+7.43%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_1000-49.87ms ± 0%10.12ms ± 0%+2.55%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_10-4425µs ± 0%545µs ± 0%+28.19%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_100-4481µs ± 0%488µs ± 0%+1.53%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_1000-4470µs ± 0%455µs ± 0%−3.06%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_10-4675µs ± 0%701µs ± 0%+3.80%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_100-4695µs ± 0%681µs ± 0%−2.10%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_1000-4692µs ± 0%692µs ± 0%+0.08%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_10-4317µs ± 0%368µs ± 0%+15.80%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_100-4315µs ± 0%342µs ± 0%+8.42%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_1000-4308µs ± 0%305µs ± 0%−1.09%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_10-4442µs ± 0%471µs ± 0%+6.56%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_100-41.43ms ± 0%1.26ms ± 0%−11.76%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_1000-49.85ms ± 0%9.75ms ± 0%−1.01%(p=1.000 n=1+1)
pkg:storage goos:linux goarch:amd64
_Storage_Simple_Read_Sync_1_10/ValueSize:0064-412.7µs ± 0%14.4µs ± 0%+13.45%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0128-413.4µs ± 0%15.4µs ± 0%+14.67%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0256-414.5µs ± 0%18.1µs ± 0%+24.91%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0512-415.8µs ± 0%18.1µs ± 0%+14.55%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:1024-419.9µs ± 0%22.5µs ± 0%+12.95%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0064-4130µs ± 0%140µs ± 0%+7.69%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0128-4129µs ± 0%153µs ± 0%+18.41%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0256-4151µs ± 0%161µs ± 0%+6.67%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0512-4156µs ± 0%189µs ± 0%+21.10%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:1024-4197µs ± 0%256µs ± 0%+30.03%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0064-414.8µs ± 0%16.0µs ± 0%+8.25%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0128-414.7µs ± 0%17.8µs ± 0%+20.84%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0256-415.4µs ± 0%17.9µs ± 0%+16.46%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0512-417.2µs ± 0%20.5µs ± 0%+19.12%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:1024-420.7µs ± 0%22.0µs ± 0%+6.25%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0064-4140µs ± 0%150µs ± 0%+7.20%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0128-4140µs ± 0%166µs ± 0%+18.47%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0256-4147µs ± 0%166µs ± 0%+12.33%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0512-4162µs ± 0%204µs ± 0%+25.26%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:1024-4197µs ± 0%257µs ± 0%+30.73%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0064-451.3µs ± 0%70.1µs ± 0%+36.49%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0128-454.0µs ± 0%57.9µs ± 0%+7.22%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0256-461.6µs ± 0%61.5µs ± 0%−0.28%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0512-456.2µs ± 0%67.2µs ± 0%+19.65%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:1024-470.9µs ± 0%73.0µs ± 0%+3.00%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0064-4382µs ± 0%505µs ± 0%+32.26%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0128-4387µs ± 0%459µs ± 0%+18.56%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0256-4408µs ± 0%512µs ± 0%+25.41%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0512-4413µs ± 0%460µs ± 0%+11.44%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:1024-4496µs ± 0%600µs ± 0%+21.09%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0064-447.1µs ± 0%51.7µs ± 0%+9.86%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0128-445.8µs ± 0%56.4µs ± 0%+23.08%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0256-448.5µs ± 0%56.2µs ± 0%+15.85%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0512-454.3µs ± 0%64.8µs ± 0%+19.45%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:1024-465.2µs ± 0%79.8µs ± 0%+22.49%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0064-4347µs ± 0%462µs ± 0%+32.91%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0128-4358µs ± 0%427µs ± 0%+19.31%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0256-4370µs ± 0%507µs ± 0%+37.20%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0512-4410µs ± 0%536µs ± 0%+30.71%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:1024-4488µs ± 0%540µs ± 0%+10.62%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0064-4123µs ± 0%136µs ± 0%+11.02%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0128-4126µs ± 0%152µs ± 0%+20.44%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0256-4128µs ± 0%135µs ± 0%+5.66%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0512-4142µs ± 0%153µs ± 0%+8.22%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:1024-4147µs ± 0%179µs ± 0%+21.65%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0064-41.25ms ± 0%1.31ms ± 0%+4.94%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0128-41.27ms ± 0%1.32ms ± 0%+4.25%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0256-41.27ms ± 0%1.38ms ± 0%+8.39%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0512-41.30ms ± 0%1.61ms ± 0%+24.15%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:1024-41.43ms ± 0%1.68ms ± 0%+17.42%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0064-4118µs ± 0%138µs ± 0%+16.58%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0128-4131µs ± 0%135µs ± 0%+3.20%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0256-4121µs ± 0%141µs ± 0%+16.33%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0512-4131µs ± 0%135µs ± 0%+3.49%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:1024-4136µs ± 0%142µs ± 0%+4.53%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0064-41.19ms ± 0%1.23ms ± 0%+3.30%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0128-41.18ms ± 0%1.27ms ± 0%+7.59%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0256-41.19ms ± 0%1.45ms ± 0%+21.95%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0512-41.25ms ± 0%1.42ms ± 0%+14.18%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:1024-41.44ms ± 0%1.54ms ± 0%+7.37%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0064-48.87µs ± 0%9.12µs ± 0%+2.91%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0128-48.79µs ± 0%10.47µs ± 0%+19.11%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0256-49.59µs ± 0%11.47µs ± 0%+19.55%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0512-411.3µs ± 0%13.5µs ± 0%+19.47%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:1024-415.4µs ± 0%17.4µs ± 0%+13.17%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0064-491.7µs ± 0%95.7µs ± 0%+4.44%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0128-4101µs ± 0%149µs ± 0%+48.24%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0256-4102µs ± 0%111µs ± 0%+9.13%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0512-4116µs ± 0%154µs ± 0%+32.90%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:1024-4166µs ± 0%213µs ± 0%+27.92%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0064-4121µs ± 0%138µs ± 0%+14.42%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0128-4121µs ± 0%134µs ± 0%+10.38%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0256-4124µs ± 0%133µs ± 0%+7.57%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0512-4122µs ± 0%145µs ± 0%+18.49%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:1024-4124µs ± 0%129µs ± 0%+3.71%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0064-41.22ms ± 0%1.35ms ± 0%+10.39%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0128-41.24ms ± 0%1.33ms ± 0%+7.21%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0256-41.16ms ± 0%1.29ms ± 0%+11.91%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0512-41.22ms ± 0%1.42ms ± 0%+16.47%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:1024-41.28ms ± 0%1.36ms ± 0%+6.29%(p=1.000 n=1+1)
 

@source-devs
Copy link

Benchmark Results

Summary

  • 113 Benchmarks successfully compared.
  • 8 Benchmarks were ✅ Better.
  • 105 Benchmarks were ❌ Worse .
  • 0 Benchmarks were ✨ Unchanged.
✅ See Better Results...
time/opdelta
_Collection_UserSimple_Create_Async_0_100-446.3ms ± 0%45.0ms ± 0%−2.75%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_1000-4459ms ± 0%446ms ± 0%−2.77%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_1000-440.9ms ± 0%40.0ms ± 0%−2.24%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_100_100-42.49ms ± 0%1.99ms ± 0%−20.25%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_1000-428.4ms ± 0%25.1ms ± 0%−11.80%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_10-4335µs ± 0%265µs ± 0%−20.80%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_100-42.58ms ± 0%1.91ms ± 0%−25.81%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0256-461.6µs ± 0%60.5µs ± 0%−1.89%(p=1.000 n=1+1)
 
❌ See Worse Results...
time/opdelta
_Collection_UserSimple_CreateMany_Sync_0_100-4226ms ± 0%296ms ± 0%+30.72%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_10-410.5ms ± 0%13.0ms ± 0%+23.73%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_100-4100ms ± 0%118ms ± 0%+18.02%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_1000-41.02s ± 0%1.08s ± 0%+5.66%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_10000-44.65s ± 0%4.70s ± 0%+1.02%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_10_10-4361µs ± 0%398µs ± 0%+10.26%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_100_100-43.71ms ± 0%4.38ms ± 0%+18.24%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_10-4374µs ± 0%407µs ± 0%+8.77%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_100-44.33ms ± 0%4.51ms ± 0%+3.96%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_10_10-4320µs ± 0%469µs ± 0%+46.64%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_100-41.23ms ± 0%1.46ms ± 0%+18.54%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_1000-410.0ms ± 0%10.3ms ± 0%+2.61%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_10-4465µs ± 0%640µs ± 0%+37.47%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_100-41.30ms ± 0%2.00ms ± 0%+53.35%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_1000-49.87ms ± 0%13.55ms ± 0%+37.34%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_10-4425µs ± 0%555µs ± 0%+30.56%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_100-4481µs ± 0%724µs ± 0%+50.72%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_1000-4470µs ± 0%504µs ± 0%+7.29%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_10-4675µs ± 0%858µs ± 0%+27.09%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_100-4695µs ± 0%771µs ± 0%+10.96%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_1000-4692µs ± 0%715µs ± 0%+3.29%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_10-4317µs ± 0%373µs ± 0%+17.55%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_100-4315µs ± 0%338µs ± 0%+7.25%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_1000-4308µs ± 0%352µs ± 0%+14.39%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_10-4442µs ± 0%578µs ± 0%+30.95%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_100-41.43ms ± 0%1.63ms ± 0%+14.52%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_1000-49.85ms ± 0%13.85ms ± 0%+40.66%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0128-413.4µs ± 0%22.7µs ± 0%+69.34%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0256-414.5µs ± 0%21.3µs ± 0%+47.18%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0512-415.8µs ± 0%26.9µs ± 0%+69.97%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:1024-419.9µs ± 0%36.4µs ± 0%+82.51%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0064-4130µs ± 0%176µs ± 0%+35.30%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0128-4129µs ± 0%165µs ± 0%+28.01%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0256-4151µs ± 0%190µs ± 0%+26.19%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0512-4156µs ± 0%186µs ± 0%+18.94%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:1024-4197µs ± 0%243µs ± 0%+23.70%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0064-414.8µs ± 0%20.4µs ± 0%+38.25%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0128-414.7µs ± 0%21.0µs ± 0%+42.77%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0256-415.4µs ± 0%21.2µs ± 0%+37.83%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0512-417.2µs ± 0%27.3µs ± 0%+58.55%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:1024-420.7µs ± 0%31.6µs ± 0%+52.12%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0064-4140µs ± 0%203µs ± 0%+45.37%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0128-4140µs ± 0%198µs ± 0%+41.10%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0256-4147µs ± 0%183µs ± 0%+24.11%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0512-4162µs ± 0%239µs ± 0%+47.29%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:1024-4197µs ± 0%269µs ± 0%+36.73%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0064-451.3µs ± 0%65.2µs ± 0%+26.97%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0128-454.0µs ± 0%74.5µs ± 0%+37.92%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0512-456.2µs ± 0%83.0µs ± 0%+47.83%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:1024-470.9µs ± 0%74.5µs ± 0%+5.09%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0064-4382µs ± 0%500µs ± 0%+31.14%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0128-4387µs ± 0%505µs ± 0%+30.51%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0256-4408µs ± 0%534µs ± 0%+30.88%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0512-4413µs ± 0%663µs ± 0%+60.66%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:1024-4496µs ± 0%823µs ± 0%+66.08%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0064-447.1µs ± 0%70.7µs ± 0%+50.07%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0128-445.8µs ± 0%67.3µs ± 0%+46.93%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0256-448.5µs ± 0%75.4µs ± 0%+55.41%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0512-454.3µs ± 0%76.1µs ± 0%+40.18%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:1024-465.2µs ± 0%86.3µs ± 0%+32.44%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0064-4347µs ± 0%504µs ± 0%+45.13%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0128-4358µs ± 0%513µs ± 0%+43.41%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0256-4370µs ± 0%443µs ± 0%+19.90%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0512-4410µs ± 0%705µs ± 0%+71.91%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:1024-4488µs ± 0%739µs ± 0%+51.39%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0064-4123µs ± 0%183µs ± 0%+48.87%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0128-4126µs ± 0%211µs ± 0%+67.26%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0256-4128µs ± 0%189µs ± 0%+48.15%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0512-4142µs ± 0%193µs ± 0%+36.64%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:1024-4147µs ± 0%192µs ± 0%+30.59%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0064-41.25ms ± 0%1.50ms ± 0%+19.87%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0128-41.27ms ± 0%1.79ms ± 0%+41.57%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0256-41.27ms ± 0%1.68ms ± 0%+31.92%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0512-41.30ms ± 0%1.52ms ± 0%+16.74%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:1024-41.43ms ± 0%2.23ms ± 0%+55.58%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0064-4118µs ± 0%169µs ± 0%+43.19%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0128-4131µs ± 0%182µs ± 0%+39.26%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0256-4121µs ± 0%170µs ± 0%+40.58%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0512-4131µs ± 0%184µs ± 0%+41.08%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:1024-4136µs ± 0%210µs ± 0%+54.19%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0064-41.19ms ± 0%1.61ms ± 0%+34.53%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0128-41.18ms ± 0%1.80ms ± 0%+52.92%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0256-41.19ms ± 0%1.94ms ± 0%+62.85%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0512-41.25ms ± 0%1.81ms ± 0%+45.49%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:1024-41.44ms ± 0%2.27ms ± 0%+57.82%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0064-48.87µs ± 0%15.37µs ± 0%+73.36%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0128-48.79µs ± 0%17.37µs ± 0%+97.57%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0256-49.59µs ± 0%16.63µs ± 0%+73.42%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0512-411.3µs ± 0%19.9µs ± 0%+76.67%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:1024-415.4µs ± 0%30.5µs ± 0%+98.40%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0064-491.7µs ± 0%150.1µs ± 0%+63.77%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0128-4101µs ± 0%149µs ± 0%+48.01%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0256-4102µs ± 0%211µs ± 0%+107.45%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0512-4116µs ± 0%187µs ± 0%+62.00%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:1024-4166µs ± 0%195µs ± 0%+17.16%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0064-4121µs ± 0%158µs ± 0%+30.96%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0128-4121µs ± 0%171µs ± 0%+40.84%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0256-4124µs ± 0%172µs ± 0%+39.32%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0512-4122µs ± 0%174µs ± 0%+42.31%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:1024-4124µs ± 0%181µs ± 0%+45.69%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0064-41.22ms ± 0%1.47ms ± 0%+19.98%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0128-41.24ms ± 0%1.89ms ± 0%+52.07%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0256-41.16ms ± 0%1.56ms ± 0%+35.15%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0512-41.22ms ± 0%1.63ms ± 0%+33.26%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:1024-41.28ms ± 0%1.71ms ± 0%+33.78%(p=1.000 n=1+1)
 
✨ See Unchanged Results...
time/opdelta
 
🐋 See Full Results...
develop.txtcurrent.txt
time/opdelta
pkg:collection goos:linux goarch:amd64
_Collection_UserSimple_CreateMany_Sync_0_10-411.1ms ± 0%12.8ms ± 0%+15.32%(p=1.000 n=1+1)
_Collection_UserSimple_CreateMany_Sync_0_100-4226ms ± 0%296ms ± 0%+30.72%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_10-410.5ms ± 0%13.0ms ± 0%+23.73%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_100-4100ms ± 0%118ms ± 0%+18.02%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_1000-41.02s ± 0%1.08s ± 0%+5.66%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_100-446.3ms ± 0%45.0ms ± 0%−2.75%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_1000-4459ms ± 0%446ms ± 0%−2.77%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_10000-44.65s ± 0%4.70s ± 0%+1.02%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_10_10-4361µs ± 0%398µs ± 0%+10.26%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_100_100-43.71ms ± 0%4.38ms ± 0%+18.24%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_1000-440.9ms ± 0%40.0ms ± 0%−2.24%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_10-4374µs ± 0%407µs ± 0%+8.77%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_100-44.33ms ± 0%4.51ms ± 0%+3.96%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_10_10-4320µs ± 0%469µs ± 0%+46.64%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_100_100-42.49ms ± 0%1.99ms ± 0%−20.25%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_1000-428.4ms ± 0%25.1ms ± 0%−11.80%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_10-4335µs ± 0%265µs ± 0%−20.80%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_100-42.58ms ± 0%1.91ms ± 0%−25.81%(p=1.000 n=1+1)
pkg:query/simple goos:linux goarch:amd64
_Query_UserSimple_Query_Sync_10-4391µs ± 0%431µs ± 0%+10.19%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_100-41.23ms ± 0%1.46ms ± 0%+18.54%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_1000-410.0ms ± 0%10.3ms ± 0%+2.61%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_10-4465µs ± 0%640µs ± 0%+37.47%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_100-41.30ms ± 0%2.00ms ± 0%+53.35%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_1000-49.87ms ± 0%13.55ms ± 0%+37.34%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_10-4425µs ± 0%555µs ± 0%+30.56%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_100-4481µs ± 0%724µs ± 0%+50.72%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_1000-4470µs ± 0%504µs ± 0%+7.29%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_10-4675µs ± 0%858µs ± 0%+27.09%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_100-4695µs ± 0%771µs ± 0%+10.96%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_1000-4692µs ± 0%715µs ± 0%+3.29%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_10-4317µs ± 0%373µs ± 0%+17.55%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_100-4315µs ± 0%338µs ± 0%+7.25%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_1000-4308µs ± 0%352µs ± 0%+14.39%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_10-4442µs ± 0%578µs ± 0%+30.95%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_100-41.43ms ± 0%1.63ms ± 0%+14.52%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_1000-49.85ms ± 0%13.85ms ± 0%+40.66%(p=1.000 n=1+1)
pkg:storage goos:linux goarch:amd64
_Storage_Simple_Read_Sync_1_10/ValueSize:0064-412.7µs ± 0%18.6µs ± 0%+46.38%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0128-413.4µs ± 0%22.7µs ± 0%+69.34%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0256-414.5µs ± 0%21.3µs ± 0%+47.18%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0512-415.8µs ± 0%26.9µs ± 0%+69.97%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:1024-419.9µs ± 0%36.4µs ± 0%+82.51%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0064-4130µs ± 0%176µs ± 0%+35.30%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0128-4129µs ± 0%165µs ± 0%+28.01%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0256-4151µs ± 0%190µs ± 0%+26.19%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0512-4156µs ± 0%186µs ± 0%+18.94%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:1024-4197µs ± 0%243µs ± 0%+23.70%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0064-414.8µs ± 0%20.4µs ± 0%+38.25%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0128-414.7µs ± 0%21.0µs ± 0%+42.77%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0256-415.4µs ± 0%21.2µs ± 0%+37.83%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0512-417.2µs ± 0%27.3µs ± 0%+58.55%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:1024-420.7µs ± 0%31.6µs ± 0%+52.12%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0064-4140µs ± 0%203µs ± 0%+45.37%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0128-4140µs ± 0%198µs ± 0%+41.10%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0256-4147µs ± 0%183µs ± 0%+24.11%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0512-4162µs ± 0%239µs ± 0%+47.29%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:1024-4197µs ± 0%269µs ± 0%+36.73%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0064-451.3µs ± 0%65.2µs ± 0%+26.97%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0128-454.0µs ± 0%74.5µs ± 0%+37.92%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0256-461.6µs ± 0%60.5µs ± 0%−1.89%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0512-456.2µs ± 0%83.0µs ± 0%+47.83%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:1024-470.9µs ± 0%74.5µs ± 0%+5.09%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0064-4382µs ± 0%500µs ± 0%+31.14%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0128-4387µs ± 0%505µs ± 0%+30.51%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0256-4408µs ± 0%534µs ± 0%+30.88%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0512-4413µs ± 0%663µs ± 0%+60.66%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:1024-4496µs ± 0%823µs ± 0%+66.08%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0064-447.1µs ± 0%70.7µs ± 0%+50.07%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0128-445.8µs ± 0%67.3µs ± 0%+46.93%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0256-448.5µs ± 0%75.4µs ± 0%+55.41%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0512-454.3µs ± 0%76.1µs ± 0%+40.18%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:1024-465.2µs ± 0%86.3µs ± 0%+32.44%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0064-4347µs ± 0%504µs ± 0%+45.13%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0128-4358µs ± 0%513µs ± 0%+43.41%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0256-4370µs ± 0%443µs ± 0%+19.90%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0512-4410µs ± 0%705µs ± 0%+71.91%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:1024-4488µs ± 0%739µs ± 0%+51.39%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0064-4123µs ± 0%183µs ± 0%+48.87%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0128-4126µs ± 0%211µs ± 0%+67.26%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0256-4128µs ± 0%189µs ± 0%+48.15%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0512-4142µs ± 0%193µs ± 0%+36.64%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:1024-4147µs ± 0%192µs ± 0%+30.59%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0064-41.25ms ± 0%1.50ms ± 0%+19.87%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0128-41.27ms ± 0%1.79ms ± 0%+41.57%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0256-41.27ms ± 0%1.68ms ± 0%+31.92%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0512-41.30ms ± 0%1.52ms ± 0%+16.74%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:1024-41.43ms ± 0%2.23ms ± 0%+55.58%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0064-4118µs ± 0%169µs ± 0%+43.19%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0128-4131µs ± 0%182µs ± 0%+39.26%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0256-4121µs ± 0%170µs ± 0%+40.58%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0512-4131µs ± 0%184µs ± 0%+41.08%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:1024-4136µs ± 0%210µs ± 0%+54.19%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0064-41.19ms ± 0%1.61ms ± 0%+34.53%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0128-41.18ms ± 0%1.80ms ± 0%+52.92%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0256-41.19ms ± 0%1.94ms ± 0%+62.85%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0512-41.25ms ± 0%1.81ms ± 0%+45.49%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:1024-41.44ms ± 0%2.27ms ± 0%+57.82%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0064-48.87µs ± 0%15.37µs ± 0%+73.36%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0128-48.79µs ± 0%17.37µs ± 0%+97.57%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0256-49.59µs ± 0%16.63µs ± 0%+73.42%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0512-411.3µs ± 0%19.9µs ± 0%+76.67%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:1024-415.4µs ± 0%30.5µs ± 0%+98.40%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0064-491.7µs ± 0%150.1µs ± 0%+63.77%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0128-4101µs ± 0%149µs ± 0%+48.01%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0256-4102µs ± 0%211µs ± 0%+107.45%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0512-4116µs ± 0%187µs ± 0%+62.00%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:1024-4166µs ± 0%195µs ± 0%+17.16%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0064-4121µs ± 0%158µs ± 0%+30.96%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0128-4121µs ± 0%171µs ± 0%+40.84%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0256-4124µs ± 0%172µs ± 0%+39.32%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0512-4122µs ± 0%174µs ± 0%+42.31%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:1024-4124µs ± 0%181µs ± 0%+45.69%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0064-41.22ms ± 0%1.47ms ± 0%+19.98%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0128-41.24ms ± 0%1.89ms ± 0%+52.07%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0256-41.16ms ± 0%1.56ms ± 0%+35.15%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0512-41.22ms ± 0%1.63ms ± 0%+33.26%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:1024-41.28ms ± 0%1.71ms ± 0%+33.78%(p=1.000 n=1+1)
 

Copy link
Collaborator

@fredcarle fredcarle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 🙂. Just a couple minor things as you'll see bellow.

@@ -114,22 +114,24 @@ func (df *DocumentFetcher) Start(ctx context.Context, txn datastore.Txn, spans c
}
//@todo: Handle fields Description
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: is there an issue open for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea, would guess that there isn't, and would suggest that finding out/removing-comment is out of scope

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I removed it anyway :)

numspans := len(spans)
var uniqueSpans core.Spans
if numspans == 0 { // no specified spans so create a prefix scan key for the entire collection
uniqueSpans := core.Spans{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: to avoid a partially initialized variable declaration (setting HasValue puts it in a confusing state) you could operate directly on df.spans. There is no error return route so there is no chance of leaving it in a wrong state. So on line 123 you could do df.spans = ... directly and on 131 you could do:

df.spans = core.Spans{
  HasValue = true,
  Value = core.MergeAscending(valueSpans),
}

Copy link
Contributor Author

@AndrewSisley AndrewSisley Jun 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree that this was done a bit strangely and could be improved, will revisit

  • fetcher df.Spans oddness

"github.com/sourcenetwork/defradb/client"
"github.com/sourcenetwork/defradb/core"
"github.com/sourcenetwork/defradb/query/graphql/mapper"
)

type deleteNode struct {
documentIterator
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: I know this is not new as it's also in all the other node types but why not use just core.Doc here instead of a struct with one value which is of type core.Doc with only one method which is just returning the core.Doc?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

documentIterator provides the Values() func

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could have Values() on core.Doc and you'd remove the confusion no?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question as fred again

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

core.Doc is 100% not the place for a Values() function lol

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe. But I find this pattern kinda weird so that's why I brought it up. Do we even need a Values function? Can we not get core.Doc directly?

Copy link
Contributor Author

@AndrewSisley AndrewSisley Jun 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Values() is a very important function on the planNode interface :) docIterator just saves having to define exactly the same thing for every node

Would be no way to get the current value without that func existing

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see what you mean. Also we keep saying Values but it's Value lol. I just think of docIterator as something you would call Next on but it only has Value which is weird to me. Maybe changing the name to something else would resolve this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think someone (John?) pointed that out when it first went in, but we shrugged it off as unimportant

@@ -129,9 +82,9 @@ func (n *updateNode) Next() (bool, error) {

func (n *updateNode) Kind() string { return "updateNode" }

func (n *updateNode) Spans(spans core.Spans) { /* no-op */ }
func (n *updateNode) Spans(spans core.Spans) { n.results.Spans(spans) }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought (non-blocking): again knowing that this is not new to this PR, I still want to point out the name of this methods makes me think that by calling it I'll be receiving the Spans. If core.Spans had a method Set, this could then become:

func (n *updateNode) Spans() core.Spans { n.results.Spans() }

Then you could call something like:

n.subType.Spans().Set(n.spans)

I think it would make it much easier to understand just by reading it.

Although it's out of scope here, I'd like us to consider that for a future change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, but very much out of scope IMO

Value []Span
}

func NewSpans(spans ...Span) Spans {
Copy link
Member

@shahzadlone shahzadlone Jun 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought: the name NewSpans makes me feel like I would get an Spans struct that's empty and just initialized. Maybe NewFromSpans or CloneSpans (I don't like these much either) haha just a thought incase you have a better name in mind.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually nevermind I see a similar NewSpan function so it's conisistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also have many other 'constuctor-like' functions using this naming convention. IMO if you want an empty you'd just do Foo{}

@@ -154,7 +154,17 @@ func isAdjacent(this DataStoreKey, other DataStoreKey) bool {
}

// Spans is a collection of individual spans.
type Spans []Span
type Spans struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: What's the benefit of doing this? Now I see some places use Spans and some use []Span is there a need for the differentiation between the two?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, Spans contains a HasValue property that allows differentiation between an explicitly empty collection, and one that is just default.

@@ -171,12 +181,12 @@ type HeadKeyValue struct {
// a unique set in ascending order, where overlapping spans are merged into a single span.
// Will handle spans with keys of different lengths, where one might be a prefix of another.
// Adjacent spans will also be merged.
func (spans Spans) MergeAscending() Spans {
func MergeAscending(spans []Span) []Span {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: why not MergeAscending(spans Spans)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is more convenient for the places that use it

@@ -55,7 +55,7 @@ type Mutation struct {
// if this mutation is on an object.
Schema string

IDs []string
IDs parserTypes.OptionalDocKeys
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Sorry I know this was named this way from before, but since we are making it an OptionalDocKeys type, wondering why we don't change it from IDs to DocKeys like in the Select.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that bugs me a too, but would say it is out of scope (I think the query spec if inconsistent between the two too)

@@ -81,8 +81,8 @@ func (h *headsetScanNode) Start() error {
}

func (h *headsetScanNode) initScan() error {
if len(h.spans) == 0 {
h.spans = append(h.spans, core.NewSpan(h.key, h.key.PrefixEnd()))
if len(h.spans.Value) == 0 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: why not !h.spans.HasValue

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bug is in select/scan - this preserves the existing behaviour, which until otherwise shown should be assumed to be the correct behaviour. Using !h.spans.HasValue would be a behaviour change.

@@ -187,10 +140,11 @@ func (p *Planner) UpdateDocs(parsed *mapper.Mutation) (planNode, error) {
update.collection = col.WithTxn(p.txn)

// create the results Select node
slctNode, err := p.Select(&parsed.Select)
resultsNode, err := p.Select(&parsed.Select)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Why the name change? I think select node makes more sense no? or maybe just results.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depends how you look at it I think. n.results existed before this PR, and TBH I don't think the name matters at all - it only lives for a couple of lines.

"selectTopNode": dataMap{
"selectNode": dataMap{
"deleteNode": dataMap{
"deleteNode": dataMap{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: change the name of this test function as this isn't a failure case anymore. Or move this case to a Success case now.

Same for some other queries that now shouldn't be returning error.

Copy link
Contributor Author

@AndrewSisley AndrewSisley Jun 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do

  • Test names etc

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing your comment is on the wrong line/file - adjusting other tests

Copy link
Member

@shahzadlone shahzadlone Jun 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

github wouldn't let me comment of the function name lines as it's too far up. Bassically just need to check the test cases in the functions that end with _Failure (if they still fail or should now be under the _Success function).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have done - sorry I squashed the commits that did this, as I incorrectly thought Fred had approved and was about to merge lol

@@ -118,9 +118,8 @@ func TestDeletionOfADocumentUsingSingleKey_Failure(t *testing.T) {
_key
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Similar to previous comment the test function name suggests this is a failure case still, but it not anymore.

@@ -137,11 +137,6 @@ func (n *selectNode) Start() error {
// remaining top level filtering, and
// renders the doc.
func (n *selectNode) Next() (bool, error) {
//todo - this is a bit lazy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Was this the hack you mentioned in the commit title?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes :)

Copy link
Member

@shahzadlone shahzadlone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the update and delete node rework, seems much cleaner to me now! Thanks for updating those tests 😄. Just had some non-blocking questions and some minor suggestions.

@AndrewSisley AndrewSisley force-pushed the sisley/refactor/I534-update-delete-node branch 4 times, most recently from 89c1e4e to 7ecb358 Compare June 30, 2022 14:28
Update included properties from a different schema to the test target.  There is a bug in both test framework and collection.update that allows this to happen, but that should be dealt with later.
Previous code would spawn a new planner and construct a new select node chain in collection.delete.  This feels much nicer to me, and removes the circular dependency that impedes further cleanup within collection.delete
Previous code would spawn a new planner and construct a new select node in collection.update.  This feels much nicer to me, and removes the circular dependency that impedes further cleanup within collection.update
@AndrewSisley AndrewSisley force-pushed the sisley/refactor/I534-update-delete-node branch from 7ecb358 to bf9b8e6 Compare June 30, 2022 15:04
@AndrewSisley AndrewSisley merged commit 70c8363 into develop Jun 30, 2022
@AndrewSisley AndrewSisley deleted the sisley/refactor/I534-update-delete-node branch June 30, 2022 15:19
shahzadlone pushed a commit to shahzadlone/defradb that referenced this pull request Feb 23, 2024
…ourcenetwork#571)

* Update test with valid fields

Update included properties from a different schema to the test target.  There is a bug in both test framework and collection.update that allows this to happen, but that should be dealt with later.

* Remove duplicate test case

* Correctly handle empty collection of ids in selects

* Rework delete node to remove secondary planner

Previous code would spawn a new planner and construct a new select node chain in collection.delete.  This feels much nicer to me, and removes the circular dependency that impedes further cleanup within collection.delete

* Rework update node to remove secondary planner

Previous code would spawn a new planner and construct a new select node in collection.update.  This feels much nicer to me, and removes the circular dependency that impedes further cleanup within collection.update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/no-benchmark Skips the action that runs the benchmark. area/query Related to the query component bug Something isn't working refactor This issue specific to or requires *notable* refactoring of existing codebases and components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Delete and update nodes are weird and circular
4 participants