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

feat: Add Average aggregate support #383

Merged
merged 4 commits into from
May 4, 2022
Merged

Conversation

AndrewSisley
Copy link
Contributor

Closes #95

Adds the Average aggregate. This aggregate is composed of the sum and count aggregates and will make use of existing count/sum nodes should they exist. Also refactors some more of the aggregate code and gql types, as Average and Sum share a fair amount of them. Adds very limited internal count filtering, to handle nil values when averaging - this will be formalized when adding proper support for aggregate filters.

Contains the commits in #374 as that is still waiting for review.

@AndrewSisley AndrewSisley added feature New feature or request area/query Related to the query component area/schema Related to the schema system labels Apr 27, 2022
@AndrewSisley AndrewSisley added this to the DefraDB v0.3 milestone Apr 27, 2022
@AndrewSisley AndrewSisley self-assigned this Apr 27, 2022
@AndrewSisley AndrewSisley force-pushed the sisley/feat/I95-average branch from 8bdb1c8 to 6d7609c Compare April 27, 2022 20:38
@source-devs

This comment was marked as spam.

This can be shared between numeric aggregates
Can be shared between most aggregates
@AndrewSisley AndrewSisley force-pushed the sisley/feat/I95-average branch from 6d7609c to 904fc49 Compare April 28, 2022 01:20
@source-devs

This comment was marked as duplicate.

@@ -433,7 +436,7 @@ func parseSelectFields(root SelectionType, fields *ast.SelectionSet) ([]Selectio

// parseField simply parses the Name/Alias
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// parseField simply parses the Name/Alias
// ParseField simply parses the Name/Alias

Copy link
Contributor Author

@AndrewSisley AndrewSisley Apr 28, 2022

Choose a reason for hiding this comment

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

Cheers, will change

  • Update ParseField comment

if f.Statement.Name.Value == name {
allArguementsMatch := true

for _, possibleMatchingArguement := range f.Statement.Arguments {
Copy link
Member

Choose a reason for hiding this comment

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

A comment here would be nice.

Copy link
Contributor Author

@AndrewSisley AndrewSisley Apr 28, 2022

Choose a reason for hiding this comment

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

Agreed - cheers for raising

  • document tryGetAggregateField


switch thisTypedValue := thisValue.GetValue().(type) {
case *ast.Variable, *ast.IntValue, *ast.FloatValue, *ast.StringValue, *ast.EnumValue, *ast.BooleanValue:
if thisTypedValue != otherValue.GetValue().(*ast.StringValue) {
Copy link
Member

Choose a reason for hiding this comment

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

Why only compare *ast.StringValue what about the comparison of *ast.Variable, *ast.IntValue, *ast.FloatValue, *ast.EnumValue, *ast.BooleanValue.

Copy link
Contributor Author

@AndrewSisley AndrewSisley Apr 28, 2022

Choose a reason for hiding this comment

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

Cheers, is a bad miss from me looks like a future bug (only StringValue is possible here atm I think RE aggregates, but would change when adding filter/limit/sort/etc)

  • Fix areAstValuesEqual switch case

@AndrewSisley AndrewSisley force-pushed the sisley/feat/I95-average branch 2 times, most recently from 1ddc22d to a38e6c9 Compare April 28, 2022 15:58
@source-devs
Copy link

Benchmark Results

Summary

  • 113 Benchmarks successfully compared.
  • 40 Benchmarks were ✅ Better.
  • 73 Benchmarks were ❌ Worse .
  • 0 Benchmarks were ✨ Unchanged.
✅ See Better Results...
time/opdelta
_Collection_UserSimple_Create_Sync_0_10-410.8ms ± 0%10.4ms ± 0%−3.78%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_100-446.8ms ± 0%46.8ms ± 0%−0.04%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_10_10-4406µs ± 0%385µs ± 0%−5.14%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_100_100-44.10ms ± 0%3.75ms ± 0%−8.63%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_1000-442.5ms ± 0%39.7ms ± 0%−6.62%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_10-4393µs ± 0%377µs ± 0%−3.98%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_100-43.91ms ± 0%3.80ms ± 0%−2.88%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_1000-424.9ms ± 0%24.6ms ± 0%−1.11%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_100-41.88ms ± 0%1.88ms ± 0%−0.01%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_10-4294µs ± 0%280µs ± 0%−4.92%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_100-4289µs ± 0%281µs ± 0%−2.84%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_1000-4282µs ± 0%275µs ± 0%−2.64%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0064-4141µs ± 0%137µs ± 0%−2.70%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0256-4150µs ± 0%148µs ± 0%−1.16%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0512-4174µs ± 0%163µs ± 0%−5.96%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:1024-4204µs ± 0%202µs ± 0%−1.22%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0064-4138µs ± 0%122µs ± 0%−11.65%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0128-4130µs ± 0%122µs ± 0%−5.85%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0256-4125µs ± 0%121µs ± 0%−3.51%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0512-4130µs ± 0%127µs ± 0%−2.15%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:1024-4142µs ± 0%142µs ± 0%−0.20%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0064-41.24ms ± 0%1.22ms ± 0%−1.38%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0128-41.24ms ± 0%1.23ms ± 0%−1.45%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0256-41.25ms ± 0%1.24ms ± 0%−0.65%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:1024-4138µs ± 0%136µs ± 0%−1.55%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0064-41.20ms ± 0%1.17ms ± 0%−2.30%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0256-41.21ms ± 0%1.19ms ± 0%−0.98%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0512-41.23ms ± 0%1.21ms ± 0%−1.36%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0128-48.75µs ± 0%8.49µs ± 0%−3.03%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0256-410.4µs ± 0%9.6µs ± 0%−7.68%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:1024-417.3µs ± 0%16.4µs ± 0%−5.37%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0064-489.6µs ± 0%86.4µs ± 0%−3.59%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0256-4107µs ± 0%98µs ± 0%−7.97%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0512-4123µs ± 0%119µs ± 0%−2.84%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0128-4127µs ± 0%118µs ± 0%−6.97%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0256-4128µs ± 0%124µs ± 0%−2.79%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0512-4132µs ± 0%129µs ± 0%−1.94%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:1024-4130µs ± 0%130µs ± 0%−0.33%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0064-41.26ms ± 0%1.24ms ± 0%−1.71%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0512-41.28ms ± 0%1.26ms ± 0%−1.66%(p=1.000 n=1+1)
 
❌ See Worse Results...
time/opdelta
_Collection_UserSimple_CreateMany_Sync_0_100-4233ms ± 0%248ms ± 0%+6.21%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_100-4102ms ± 0%109ms ± 0%+6.01%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_1000-41.06s ± 0%1.12s ± 0%+5.89%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_1000-4446ms ± 0%459ms ± 0%+2.79%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_10000-44.65s ± 0%4.68s ± 0%+0.62%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_10_10-4250µs ± 0%255µs ± 0%+1.98%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_100_100-41.84ms ± 0%1.86ms ± 0%+1.21%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_10-4262µs ± 0%268µs ± 0%+2.33%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_100-41.17ms ± 0%1.22ms ± 0%+4.05%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_1000-49.50ms ± 0%9.97ms ± 0%+4.99%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_10-4414µs ± 0%430µs ± 0%+3.87%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_100-41.26ms ± 0%1.32ms ± 0%+4.62%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_1000-410.0ms ± 0%10.3ms ± 0%+2.06%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_10-4377µs ± 0%425µs ± 0%+12.77%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_100-4431µs ± 0%465µs ± 0%+7.95%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_1000-4435µs ± 0%443µs ± 0%+1.87%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_10-4644µs ± 0%682µs ± 0%+5.94%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_100-4645µs ± 0%717µs ± 0%+11.17%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_1000-4640µs ± 0%678µs ± 0%+6.03%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_10-4417µs ± 0%430µs ± 0%+3.14%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_100-41.37ms ± 0%1.41ms ± 0%+2.88%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_1000-412.2ms ± 0%12.4ms ± 0%+1.59%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0128-413.3µs ± 0%14.1µs ± 0%+5.63%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0256-414.1µs ± 0%15.1µs ± 0%+7.12%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0512-415.2µs ± 0%18.2µs ± 0%+19.69%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:1024-419.0µs ± 0%22.2µs ± 0%+17.16%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0064-4124µs ± 0%130µs ± 0%+4.70%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0128-4130µs ± 0%133µs ± 0%+2.01%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0256-4140µs ± 0%141µs ± 0%+0.60%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0512-4157µs ± 0%163µs ± 0%+3.77%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:1024-4196µs ± 0%208µs ± 0%+6.54%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0064-414.7µs ± 0%14.7µs ± 0%+0.22%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0128-414.9µs ± 0%15.8µs ± 0%+5.45%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0256-415.4µs ± 0%16.7µs ± 0%+8.23%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0512-416.7µs ± 0%17.7µs ± 0%+5.56%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:1024-420.3µs ± 0%21.4µs ± 0%+5.53%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0128-4145µs ± 0%146µs ± 0%+0.42%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0064-443.9µs ± 0%48.1µs ± 0%+9.55%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0128-445.1µs ± 0%52.1µs ± 0%+15.54%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0256-449.4µs ± 0%55.7µs ± 0%+12.82%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0512-457.3µs ± 0%59.6µs ± 0%+3.92%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:1024-466.8µs ± 0%68.8µs ± 0%+3.04%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0064-4335µs ± 0%376µs ± 0%+12.42%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0128-4329µs ± 0%371µs ± 0%+12.74%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0256-4355µs ± 0%386µs ± 0%+8.67%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0512-4401µs ± 0%412µs ± 0%+2.87%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:1024-4490µs ± 0%552µs ± 0%+12.61%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0064-443.8µs ± 0%45.5µs ± 0%+3.93%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0128-444.0µs ± 0%47.9µs ± 0%+8.74%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0256-445.2µs ± 0%51.1µs ± 0%+13.24%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0512-452.9µs ± 0%58.6µs ± 0%+10.88%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:1024-466.4µs ± 0%68.1µs ± 0%+2.51%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0064-4340µs ± 0%389µs ± 0%+14.34%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0128-4349µs ± 0%418µs ± 0%+19.73%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0256-4362µs ± 0%393µs ± 0%+8.47%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0512-4389µs ± 0%437µs ± 0%+12.29%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:1024-4499µs ± 0%505µs ± 0%+1.23%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0512-41.26ms ± 0%1.29ms ± 0%+1.97%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:1024-41.40ms ± 0%1.43ms ± 0%+1.62%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0064-4118µs ± 0%124µs ± 0%+5.19%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0128-4117µs ± 0%123µs ± 0%+5.27%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0256-4120µs ± 0%126µs ± 0%+5.40%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0512-4125µs ± 0%138µs ± 0%+10.52%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0128-41.20ms ± 0%1.20ms ± 0%+0.07%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:1024-41.38ms ± 0%1.41ms ± 0%+2.58%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0064-48.30µs ± 0%8.32µs ± 0%+0.30%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0512-411.5µs ± 0%11.6µs ± 0%+1.01%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0128-494.1µs ± 0%102.9µs ± 0%+9.35%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:1024-4147µs ± 0%155µs ± 0%+5.07%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0064-4126µs ± 0%127µs ± 0%+1.09%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0128-41.25ms ± 0%1.26ms ± 0%+0.78%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0256-41.23ms ± 0%1.26ms ± 0%+2.52%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:1024-41.29ms ± 0%1.29ms ± 0%+0.56%(p=1.000 n=1+1)
 
✨ See Unchanged Results...
time/opdelta
 
🐋 See Full Results...
develop.txtcurrent.txt
time/opdelta
pkg:github.com/sourcenetwork/defradb/bench/collection goos:linux goarch:amd64
_Collection_UserSimple_CreateMany_Sync_0_10-411.0ms ± 0%10.8ms ± 0%−2.43%(p=1.000 n=1+1)
_Collection_UserSimple_CreateMany_Sync_0_100-4233ms ± 0%248ms ± 0%+6.21%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_10-410.8ms ± 0%10.4ms ± 0%−3.78%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_100-4102ms ± 0%109ms ± 0%+6.01%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_1000-41.06s ± 0%1.12s ± 0%+5.89%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_100-446.8ms ± 0%46.8ms ± 0%−0.04%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_1000-4446ms ± 0%459ms ± 0%+2.79%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_10000-44.65s ± 0%4.68s ± 0%+0.62%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_10_10-4406µs ± 0%385µs ± 0%−5.14%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_100_100-44.10ms ± 0%3.75ms ± 0%−8.63%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_1000-442.5ms ± 0%39.7ms ± 0%−6.62%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_10-4393µs ± 0%377µs ± 0%−3.98%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_100-43.91ms ± 0%3.80ms ± 0%−2.88%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_10_10-4250µs ± 0%255µs ± 0%+1.98%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_100_100-41.84ms ± 0%1.86ms ± 0%+1.21%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_1000-424.9ms ± 0%24.6ms ± 0%−1.11%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_10-4262µs ± 0%268µs ± 0%+2.33%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_100-41.88ms ± 0%1.88ms ± 0%−0.01%(p=1.000 n=1+1)
pkg:github.com/sourcenetwork/defradb/bench/query/simple goos:linux goarch:amd64
_Query_UserSimple_Query_Sync_10-4355µs ± 0%342µs ± 0%−3.59%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_100-41.17ms ± 0%1.22ms ± 0%+4.05%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_1000-49.50ms ± 0%9.97ms ± 0%+4.99%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_10-4414µs ± 0%430µs ± 0%+3.87%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_100-41.26ms ± 0%1.32ms ± 0%+4.62%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_1000-410.0ms ± 0%10.3ms ± 0%+2.06%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_10-4377µs ± 0%425µs ± 0%+12.77%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_100-4431µs ± 0%465µs ± 0%+7.95%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_1000-4435µs ± 0%443µs ± 0%+1.87%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_10-4644µs ± 0%682µs ± 0%+5.94%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_100-4645µs ± 0%717µs ± 0%+11.17%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_1000-4640µs ± 0%678µs ± 0%+6.03%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_10-4294µs ± 0%280µs ± 0%−4.92%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_100-4289µs ± 0%281µs ± 0%−2.84%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_1000-4282µs ± 0%275µs ± 0%−2.64%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_10-4417µs ± 0%430µs ± 0%+3.14%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_100-41.37ms ± 0%1.41ms ± 0%+2.88%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_1000-412.2ms ± 0%12.4ms ± 0%+1.59%(p=1.000 n=1+1)
pkg:github.com/sourcenetwork/defradb/bench/storage goos:linux goarch:amd64
_Storage_Simple_Read_Sync_1_10/ValueSize:0064-413.0µs ± 0%13.9µs ± 0%+7.05%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0128-413.3µs ± 0%14.1µs ± 0%+5.63%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0256-414.1µs ± 0%15.1µs ± 0%+7.12%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0512-415.2µs ± 0%18.2µs ± 0%+19.69%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:1024-419.0µs ± 0%22.2µs ± 0%+17.16%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0064-4124µs ± 0%130µs ± 0%+4.70%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0128-4130µs ± 0%133µs ± 0%+2.01%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0256-4140µs ± 0%141µs ± 0%+0.60%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0512-4157µs ± 0%163µs ± 0%+3.77%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:1024-4196µs ± 0%208µs ± 0%+6.54%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0064-414.7µs ± 0%14.7µs ± 0%+0.22%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0128-414.9µs ± 0%15.8µs ± 0%+5.45%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0256-415.4µs ± 0%16.7µs ± 0%+8.23%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0512-416.7µs ± 0%17.7µs ± 0%+5.56%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:1024-420.3µs ± 0%21.4µs ± 0%+5.53%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0064-4141µs ± 0%137µs ± 0%−2.70%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0128-4145µs ± 0%146µs ± 0%+0.42%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0256-4150µs ± 0%148µs ± 0%−1.16%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0512-4174µs ± 0%163µs ± 0%−5.96%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:1024-4204µs ± 0%202µs ± 0%−1.22%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0064-443.9µs ± 0%48.1µs ± 0%+9.55%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0128-445.1µs ± 0%52.1µs ± 0%+15.54%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0256-449.4µs ± 0%55.7µs ± 0%+12.82%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0512-457.3µs ± 0%59.6µs ± 0%+3.92%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:1024-466.8µs ± 0%68.8µs ± 0%+3.04%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0064-4335µs ± 0%376µs ± 0%+12.42%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0128-4329µs ± 0%371µs ± 0%+12.74%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0256-4355µs ± 0%386µs ± 0%+8.67%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0512-4401µs ± 0%412µs ± 0%+2.87%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:1024-4490µs ± 0%552µs ± 0%+12.61%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0064-443.8µs ± 0%45.5µs ± 0%+3.93%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0128-444.0µs ± 0%47.9µs ± 0%+8.74%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0256-445.2µs ± 0%51.1µs ± 0%+13.24%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0512-452.9µs ± 0%58.6µs ± 0%+10.88%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:1024-466.4µs ± 0%68.1µs ± 0%+2.51%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0064-4340µs ± 0%389µs ± 0%+14.34%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0128-4349µs ± 0%418µs ± 0%+19.73%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0256-4362µs ± 0%393µs ± 0%+8.47%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0512-4389µs ± 0%437µs ± 0%+12.29%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:1024-4499µs ± 0%505µs ± 0%+1.23%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0064-4138µs ± 0%122µs ± 0%−11.65%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0128-4130µs ± 0%122µs ± 0%−5.85%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0256-4125µs ± 0%121µs ± 0%−3.51%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0512-4130µs ± 0%127µs ± 0%−2.15%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:1024-4142µs ± 0%142µs ± 0%−0.20%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0064-41.24ms ± 0%1.22ms ± 0%−1.38%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0128-41.24ms ± 0%1.23ms ± 0%−1.45%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0256-41.25ms ± 0%1.24ms ± 0%−0.65%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0512-41.26ms ± 0%1.29ms ± 0%+1.97%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:1024-41.40ms ± 0%1.43ms ± 0%+1.62%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0064-4118µs ± 0%124µs ± 0%+5.19%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0128-4117µs ± 0%123µs ± 0%+5.27%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0256-4120µs ± 0%126µs ± 0%+5.40%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0512-4125µs ± 0%138µs ± 0%+10.52%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:1024-4138µs ± 0%136µs ± 0%−1.55%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0064-41.20ms ± 0%1.17ms ± 0%−2.30%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0128-41.20ms ± 0%1.20ms ± 0%+0.07%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0256-41.21ms ± 0%1.19ms ± 0%−0.98%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0512-41.23ms ± 0%1.21ms ± 0%−1.36%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:1024-41.38ms ± 0%1.41ms ± 0%+2.58%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0064-48.30µs ± 0%8.32µs ± 0%+0.30%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0128-48.75µs ± 0%8.49µs ± 0%−3.03%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0256-410.4µs ± 0%9.6µs ± 0%−7.68%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0512-411.5µs ± 0%11.6µs ± 0%+1.01%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:1024-417.3µs ± 0%16.4µs ± 0%−5.37%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0064-489.6µs ± 0%86.4µs ± 0%−3.59%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0128-494.1µs ± 0%102.9µs ± 0%+9.35%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0256-4107µs ± 0%98µs ± 0%−7.97%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0512-4123µs ± 0%119µs ± 0%−2.84%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:1024-4147µs ± 0%155µs ± 0%+5.07%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0064-4126µs ± 0%127µs ± 0%+1.09%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0128-4127µs ± 0%118µs ± 0%−6.97%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0256-4128µs ± 0%124µs ± 0%−2.79%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0512-4132µs ± 0%129µs ± 0%−1.94%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:1024-4130µs ± 0%130µs ± 0%−0.33%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0064-41.26ms ± 0%1.24ms ± 0%−1.71%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0128-41.25ms ± 0%1.26ms ± 0%+0.78%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0256-41.23ms ± 0%1.26ms ± 0%+2.52%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0512-41.28ms ± 0%1.26ms ± 0%−1.66%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:1024-41.29ms ± 0%1.29ms ± 0%+0.56%(p=1.000 n=1+1)
 

@source-devs
Copy link

Benchmark Results

Summary

  • 113 Benchmarks successfully compared.
  • 43 Benchmarks were ✅ Better.
  • 70 Benchmarks were ❌ Worse .
  • 0 Benchmarks were ✨ Unchanged.
✅ See Better Results...
time/opdelta
_Collection_UserSimple_Create_Sync_0_10-410.8ms ± 0%10.3ms ± 0%−5.05%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_1000-41.06s ± 0%1.05s ± 0%−0.30%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_10_10-4406µs ± 0%345µs ± 0%−14.89%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_100_100-44.10ms ± 0%3.66ms ± 0%−10.81%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_1000-442.5ms ± 0%39.9ms ± 0%−6.08%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_10-4393µs ± 0%341µs ± 0%−13.10%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_100-43.91ms ± 0%3.81ms ± 0%−2.62%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_10_10-4250µs ± 0%248µs ± 0%−0.57%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_100_100-41.84ms ± 0%1.83ms ± 0%−0.44%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_1000-424.9ms ± 0%24.5ms ± 0%−1.61%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_10-4262µs ± 0%252µs ± 0%−3.79%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_100-41.88ms ± 0%1.85ms ± 0%−1.63%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_1000-410.0ms ± 0%10.0ms ± 0%−0.23%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_10-4644µs ± 0%617µs ± 0%−4.17%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_100-4645µs ± 0%644µs ± 0%−0.15%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_1000-4640µs ± 0%637µs ± 0%−0.39%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_10-4294µs ± 0%275µs ± 0%−6.60%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_100-4289µs ± 0%282µs ± 0%−2.31%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_1000-4282µs ± 0%274µs ± 0%−3.07%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_1000-412.2ms ± 0%12.1ms ± 0%−0.50%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:1024-4196µs ± 0%193µs ± 0%−1.43%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0064-4141µs ± 0%139µs ± 0%−1.29%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0256-4150µs ± 0%150µs ± 0%−0.00%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0512-4174µs ± 0%169µs ± 0%−2.40%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0512-457.3µs ± 0%57.0µs ± 0%−0.59%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:1024-4499µs ± 0%493µs ± 0%−1.19%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0064-4138µs ± 0%117µs ± 0%−14.97%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0128-4130µs ± 0%118µs ± 0%−9.16%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0256-4125µs ± 0%119µs ± 0%−4.78%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0512-4130µs ± 0%124µs ± 0%−4.13%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:1024-4142µs ± 0%137µs ± 0%−3.33%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0064-41.24ms ± 0%1.17ms ± 0%−5.67%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0128-41.24ms ± 0%1.21ms ± 0%−2.51%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0064-4118µs ± 0%117µs ± 0%−0.60%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0128-4117µs ± 0%112µs ± 0%−3.95%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0256-4120µs ± 0%118µs ± 0%−1.69%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0512-4125µs ± 0%123µs ± 0%−1.73%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0064-41.20ms ± 0%1.18ms ± 0%−1.91%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0128-41.20ms ± 0%1.19ms ± 0%−0.55%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0256-410.4µs ± 0%10.3µs ± 0%−0.62%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:1024-417.3µs ± 0%14.9µs ± 0%−14.09%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0064-489.6µs ± 0%88.3µs ± 0%−1.49%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0256-4128µs ± 0%125µs ± 0%−2.07%(p=1.000 n=1+1)
 
❌ See Worse Results...
time/opdelta
_Collection_UserSimple_CreateMany_Sync_0_100-4233ms ± 0%238ms ± 0%+2.00%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_100-4102ms ± 0%130ms ± 0%+26.49%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_100-446.8ms ± 0%47.7ms ± 0%+1.76%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_1000-4446ms ± 0%470ms ± 0%+5.29%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_10000-44.65s ± 0%4.72s ± 0%+1.39%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_100-41.17ms ± 0%1.18ms ± 0%+0.76%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_1000-49.50ms ± 0%9.92ms ± 0%+4.42%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_10-4414µs ± 0%450µs ± 0%+8.74%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_100-41.26ms ± 0%1.26ms ± 0%+0.01%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_10-4377µs ± 0%395µs ± 0%+4.72%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_100-4431µs ± 0%437µs ± 0%+1.44%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_1000-4435µs ± 0%444µs ± 0%+2.09%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_10-4417µs ± 0%446µs ± 0%+6.80%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_100-41.37ms ± 0%1.49ms ± 0%+8.88%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0128-413.3µs ± 0%13.7µs ± 0%+2.50%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0256-414.1µs ± 0%14.3µs ± 0%+1.31%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0512-415.2µs ± 0%16.3µs ± 0%+6.76%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:1024-419.0µs ± 0%19.2µs ± 0%+1.07%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0064-4124µs ± 0%149µs ± 0%+20.37%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0128-4130µs ± 0%138µs ± 0%+6.53%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0256-4140µs ± 0%156µs ± 0%+11.48%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0512-4157µs ± 0%159µs ± 0%+1.51%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0064-414.7µs ± 0%14.7µs ± 0%+0.17%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0128-414.9µs ± 0%15.4µs ± 0%+3.18%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0256-415.4µs ± 0%15.5µs ± 0%+0.62%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0512-416.7µs ± 0%17.1µs ± 0%+2.03%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:1024-420.3µs ± 0%20.7µs ± 0%+2.19%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0128-4145µs ± 0%155µs ± 0%+7.21%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:1024-4204µs ± 0%216µs ± 0%+5.62%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0064-443.9µs ± 0%45.2µs ± 0%+3.02%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0128-445.1µs ± 0%45.6µs ± 0%+1.17%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0256-449.4µs ± 0%49.5µs ± 0%+0.26%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:1024-466.8µs ± 0%68.2µs ± 0%+2.08%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0064-4335µs ± 0%382µs ± 0%+14.04%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0128-4329µs ± 0%377µs ± 0%+14.66%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0256-4355µs ± 0%374µs ± 0%+5.35%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0512-4401µs ± 0%421µs ± 0%+5.08%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:1024-4490µs ± 0%498µs ± 0%+1.64%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0064-443.8µs ± 0%49.8µs ± 0%+13.71%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0128-444.0µs ± 0%51.9µs ± 0%+17.87%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0256-445.2µs ± 0%52.9µs ± 0%+17.12%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0512-452.9µs ± 0%55.4µs ± 0%+4.81%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:1024-466.4µs ± 0%69.6µs ± 0%+4.75%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0064-4340µs ± 0%384µs ± 0%+12.85%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0128-4349µs ± 0%364µs ± 0%+4.11%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0256-4362µs ± 0%387µs ± 0%+6.96%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0512-4389µs ± 0%430µs ± 0%+10.51%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0256-41.25ms ± 0%1.27ms ± 0%+1.33%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0512-41.26ms ± 0%1.32ms ± 0%+4.41%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:1024-41.40ms ± 0%1.42ms ± 0%+1.34%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:1024-4138µs ± 0%144µs ± 0%+4.16%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0256-41.21ms ± 0%1.26ms ± 0%+4.60%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0512-41.23ms ± 0%1.24ms ± 0%+1.43%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:1024-41.38ms ± 0%1.42ms ± 0%+3.43%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0064-48.30µs ± 0%8.94µs ± 0%+7.75%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0128-48.75µs ± 0%9.66µs ± 0%+10.37%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0512-411.5µs ± 0%11.7µs ± 0%+1.33%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0128-494.1µs ± 0%105.6µs ± 0%+12.16%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0256-4107µs ± 0%120µs ± 0%+12.83%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0512-4123µs ± 0%129µs ± 0%+5.11%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:1024-4147µs ± 0%169µs ± 0%+14.65%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0064-4126µs ± 0%137µs ± 0%+8.74%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0128-4127µs ± 0%136µs ± 0%+6.97%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0512-4132µs ± 0%146µs ± 0%+10.59%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:1024-4130µs ± 0%151µs ± 0%+16.22%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0064-41.26ms ± 0%1.44ms ± 0%+14.08%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0128-41.25ms ± 0%1.30ms ± 0%+4.21%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0256-41.23ms ± 0%1.47ms ± 0%+19.30%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0512-41.28ms ± 0%1.50ms ± 0%+17.37%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:1024-41.29ms ± 0%1.52ms ± 0%+18.47%(p=1.000 n=1+1)
 
✨ See Unchanged Results...
time/opdelta
 
🐋 See Full Results...
develop.txtcurrent.txt
time/opdelta
pkg:github.com/sourcenetwork/defradb/bench/collection goos:linux goarch:amd64
_Collection_UserSimple_CreateMany_Sync_0_10-411.0ms ± 0%10.9ms ± 0%−1.38%(p=1.000 n=1+1)
_Collection_UserSimple_CreateMany_Sync_0_100-4233ms ± 0%238ms ± 0%+2.00%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_10-410.8ms ± 0%10.3ms ± 0%−5.05%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_100-4102ms ± 0%130ms ± 0%+26.49%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_1000-41.06s ± 0%1.05s ± 0%−0.30%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_100-446.8ms ± 0%47.7ms ± 0%+1.76%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_1000-4446ms ± 0%470ms ± 0%+5.29%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_10000-44.65s ± 0%4.72s ± 0%+1.39%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_10_10-4406µs ± 0%345µs ± 0%−14.89%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_100_100-44.10ms ± 0%3.66ms ± 0%−10.81%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_1000-442.5ms ± 0%39.9ms ± 0%−6.08%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_10-4393µs ± 0%341µs ± 0%−13.10%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_100-43.91ms ± 0%3.81ms ± 0%−2.62%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_10_10-4250µs ± 0%248µs ± 0%−0.57%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_100_100-41.84ms ± 0%1.83ms ± 0%−0.44%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_1000-424.9ms ± 0%24.5ms ± 0%−1.61%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_10-4262µs ± 0%252µs ± 0%−3.79%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_100-41.88ms ± 0%1.85ms ± 0%−1.63%(p=1.000 n=1+1)
pkg:github.com/sourcenetwork/defradb/bench/query/simple goos:linux goarch:amd64
_Query_UserSimple_Query_Sync_10-4355µs ± 0%346µs ± 0%−2.44%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_100-41.17ms ± 0%1.18ms ± 0%+0.76%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_1000-49.50ms ± 0%9.92ms ± 0%+4.42%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_10-4414µs ± 0%450µs ± 0%+8.74%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_100-41.26ms ± 0%1.26ms ± 0%+0.01%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_1000-410.0ms ± 0%10.0ms ± 0%−0.23%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_10-4377µs ± 0%395µs ± 0%+4.72%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_100-4431µs ± 0%437µs ± 0%+1.44%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_1000-4435µs ± 0%444µs ± 0%+2.09%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_10-4644µs ± 0%617µs ± 0%−4.17%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_100-4645µs ± 0%644µs ± 0%−0.15%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_1000-4640µs ± 0%637µs ± 0%−0.39%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_10-4294µs ± 0%275µs ± 0%−6.60%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_100-4289µs ± 0%282µs ± 0%−2.31%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_1000-4282µs ± 0%274µs ± 0%−3.07%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_10-4417µs ± 0%446µs ± 0%+6.80%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_100-41.37ms ± 0%1.49ms ± 0%+8.88%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_1000-412.2ms ± 0%12.1ms ± 0%−0.50%(p=1.000 n=1+1)
pkg:github.com/sourcenetwork/defradb/bench/storage goos:linux goarch:amd64
_Storage_Simple_Read_Sync_1_10/ValueSize:0064-413.0µs ± 0%13.5µs ± 0%+3.88%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0128-413.3µs ± 0%13.7µs ± 0%+2.50%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0256-414.1µs ± 0%14.3µs ± 0%+1.31%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0512-415.2µs ± 0%16.3µs ± 0%+6.76%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:1024-419.0µs ± 0%19.2µs ± 0%+1.07%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0064-4124µs ± 0%149µs ± 0%+20.37%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0128-4130µs ± 0%138µs ± 0%+6.53%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0256-4140µs ± 0%156µs ± 0%+11.48%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0512-4157µs ± 0%159µs ± 0%+1.51%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:1024-4196µs ± 0%193µs ± 0%−1.43%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0064-414.7µs ± 0%14.7µs ± 0%+0.17%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0128-414.9µs ± 0%15.4µs ± 0%+3.18%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0256-415.4µs ± 0%15.5µs ± 0%+0.62%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0512-416.7µs ± 0%17.1µs ± 0%+2.03%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:1024-420.3µs ± 0%20.7µs ± 0%+2.19%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0064-4141µs ± 0%139µs ± 0%−1.29%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0128-4145µs ± 0%155µs ± 0%+7.21%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0256-4150µs ± 0%150µs ± 0%−0.00%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0512-4174µs ± 0%169µs ± 0%−2.40%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:1024-4204µs ± 0%216µs ± 0%+5.62%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0064-443.9µs ± 0%45.2µs ± 0%+3.02%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0128-445.1µs ± 0%45.6µs ± 0%+1.17%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0256-449.4µs ± 0%49.5µs ± 0%+0.26%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0512-457.3µs ± 0%57.0µs ± 0%−0.59%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:1024-466.8µs ± 0%68.2µs ± 0%+2.08%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0064-4335µs ± 0%382µs ± 0%+14.04%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0128-4329µs ± 0%377µs ± 0%+14.66%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0256-4355µs ± 0%374µs ± 0%+5.35%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0512-4401µs ± 0%421µs ± 0%+5.08%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:1024-4490µs ± 0%498µs ± 0%+1.64%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0064-443.8µs ± 0%49.8µs ± 0%+13.71%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0128-444.0µs ± 0%51.9µs ± 0%+17.87%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0256-445.2µs ± 0%52.9µs ± 0%+17.12%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0512-452.9µs ± 0%55.4µs ± 0%+4.81%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:1024-466.4µs ± 0%69.6µs ± 0%+4.75%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0064-4340µs ± 0%384µs ± 0%+12.85%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0128-4349µs ± 0%364µs ± 0%+4.11%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0256-4362µs ± 0%387µs ± 0%+6.96%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0512-4389µs ± 0%430µs ± 0%+10.51%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:1024-4499µs ± 0%493µs ± 0%−1.19%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0064-4138µs ± 0%117µs ± 0%−14.97%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0128-4130µs ± 0%118µs ± 0%−9.16%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0256-4125µs ± 0%119µs ± 0%−4.78%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0512-4130µs ± 0%124µs ± 0%−4.13%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:1024-4142µs ± 0%137µs ± 0%−3.33%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0064-41.24ms ± 0%1.17ms ± 0%−5.67%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0128-41.24ms ± 0%1.21ms ± 0%−2.51%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0256-41.25ms ± 0%1.27ms ± 0%+1.33%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0512-41.26ms ± 0%1.32ms ± 0%+4.41%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:1024-41.40ms ± 0%1.42ms ± 0%+1.34%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0064-4118µs ± 0%117µs ± 0%−0.60%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0128-4117µs ± 0%112µs ± 0%−3.95%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0256-4120µs ± 0%118µs ± 0%−1.69%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0512-4125µs ± 0%123µs ± 0%−1.73%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:1024-4138µs ± 0%144µs ± 0%+4.16%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0064-41.20ms ± 0%1.18ms ± 0%−1.91%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0128-41.20ms ± 0%1.19ms ± 0%−0.55%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0256-41.21ms ± 0%1.26ms ± 0%+4.60%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0512-41.23ms ± 0%1.24ms ± 0%+1.43%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:1024-41.38ms ± 0%1.42ms ± 0%+3.43%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0064-48.30µs ± 0%8.94µs ± 0%+7.75%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0128-48.75µs ± 0%9.66µs ± 0%+10.37%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0256-410.4µs ± 0%10.3µs ± 0%−0.62%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0512-411.5µs ± 0%11.7µs ± 0%+1.33%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:1024-417.3µs ± 0%14.9µs ± 0%−14.09%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0064-489.6µs ± 0%88.3µs ± 0%−1.49%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0128-494.1µs ± 0%105.6µs ± 0%+12.16%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0256-4107µs ± 0%120µs ± 0%+12.83%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0512-4123µs ± 0%129µs ± 0%+5.11%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:1024-4147µs ± 0%169µs ± 0%+14.65%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0064-4126µs ± 0%137µs ± 0%+8.74%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0128-4127µs ± 0%136µs ± 0%+6.97%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0256-4128µs ± 0%125µs ± 0%−2.07%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0512-4132µs ± 0%146µs ± 0%+10.59%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:1024-4130µs ± 0%151µs ± 0%+16.22%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0064-41.26ms ± 0%1.44ms ± 0%+14.08%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0128-41.25ms ± 0%1.30ms ± 0%+4.21%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0256-41.23ms ± 0%1.47ms ± 0%+19.30%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0512-41.28ms ± 0%1.50ms ± 0%+17.37%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:1024-41.29ms ± 0%1.52ms ± 0%+18.47%(p=1.000 n=1+1)
 

@codecov
Copy link

codecov bot commented Apr 28, 2022

Codecov Report

Merging #383 (b453259) into develop (655433d) will increase coverage by 0.29%.
The diff coverage is 78.38%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #383      +/-   ##
===========================================
+ Coverage    65.20%   65.49%   +0.29%     
===========================================
  Files           80       81       +1     
  Lines         9251     9492     +241     
===========================================
+ Hits          6032     6217     +185     
- Misses        2599     2645      +46     
- Partials       620      630      +10     
Impacted Files Coverage Δ
query/graphql/planner/select.go 71.11% <67.21%> (-1.69%) ⬇️
query/graphql/planner/average.go 78.26% <78.26%> (ø)
query/graphql/planner/count.go 89.58% <80.00%> (-4.36%) ⬇️
query/graphql/schema/generate.go 81.65% <92.77%> (+0.93%) ⬆️
query/graphql/parser/query.go 75.20% <100.00%> (ø)
query/graphql/planner/sum.go 78.39% <100.00%> (+0.68%) ⬆️

@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_Read_Sync_10_10-4406µs ± 0%363µs ± 0%−10.60%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_100_100-44.10ms ± 0%3.78ms ± 0%−7.76%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_1000-442.5ms ± 0%40.0ms ± 0%−5.84%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_10-4393µs ± 0%386µs ± 0%−1.67%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_100-41.88ms ± 0%1.88ms ± 0%−0.27%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_1000-4282µs ± 0%277µs ± 0%−1.76%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0512-457.3µs ± 0%56.6µs ± 0%−1.29%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0256-41.25ms ± 0%1.23ms ± 0%−1.39%(p=1.000 n=1+1)
 
❌ See Worse Results...
time/opdelta
_Collection_UserSimple_CreateMany_Sync_0_100-4233ms ± 0%278ms ± 0%+19.03%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_10-410.8ms ± 0%13.0ms ± 0%+19.40%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_100-4102ms ± 0%128ms ± 0%+24.51%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_1000-41.06s ± 0%1.21s ± 0%+14.30%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_100-446.8ms ± 0%50.1ms ± 0%+6.90%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_1000-4446ms ± 0%469ms ± 0%+5.14%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_10000-44.65s ± 0%4.85s ± 0%+4.23%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_100-43.91ms ± 0%3.94ms ± 0%+0.70%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_10_10-4250µs ± 0%318µs ± 0%+27.45%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_100_100-41.84ms ± 0%1.89ms ± 0%+2.68%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_1000-424.9ms ± 0%25.0ms ± 0%+0.50%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_10-4262µs ± 0%262µs ± 0%+0.18%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_100-41.17ms ± 0%1.42ms ± 0%+21.31%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_1000-49.50ms ± 0%10.83ms ± 0%+13.99%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_10-4414µs ± 0%532µs ± 0%+28.36%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_100-41.26ms ± 0%1.71ms ± 0%+35.21%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_1000-410.0ms ± 0%12.1ms ± 0%+20.56%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_10-4377µs ± 0%594µs ± 0%+57.47%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_100-4431µs ± 0%572µs ± 0%+32.58%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_1000-4435µs ± 0%486µs ± 0%+11.63%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_10-4644µs ± 0%834µs ± 0%+29.61%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_100-4645µs ± 0%983µs ± 0%+52.49%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_1000-4640µs ± 0%709µs ± 0%+10.88%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_10-4294µs ± 0%401µs ± 0%+36.17%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_100-4289µs ± 0%353µs ± 0%+22.18%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_10-4417µs ± 0%507µs ± 0%+21.59%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_100-41.37ms ± 0%2.05ms ± 0%+49.31%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_1000-412.2ms ± 0%13.2ms ± 0%+8.34%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0128-413.3µs ± 0%17.6µs ± 0%+32.41%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0256-414.1µs ± 0%18.7µs ± 0%+32.84%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0512-415.2µs ± 0%21.3µs ± 0%+40.11%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:1024-419.0µs ± 0%29.2µs ± 0%+53.76%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0064-4124µs ± 0%174µs ± 0%+40.01%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0128-4130µs ± 0%177µs ± 0%+36.20%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0256-4140µs ± 0%186µs ± 0%+32.87%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0512-4157µs ± 0%204µs ± 0%+29.89%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:1024-4196µs ± 0%263µs ± 0%+34.24%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0064-414.7µs ± 0%18.8µs ± 0%+27.92%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0128-414.9µs ± 0%18.7µs ± 0%+25.23%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0256-415.4µs ± 0%24.5µs ± 0%+59.03%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0512-416.7µs ± 0%29.9µs ± 0%+78.78%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:1024-420.3µs ± 0%31.2µs ± 0%+54.12%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0064-4141µs ± 0%184µs ± 0%+30.93%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0128-4145µs ± 0%178µs ± 0%+22.91%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0256-4150µs ± 0%174µs ± 0%+16.01%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0512-4174µs ± 0%201µs ± 0%+15.85%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:1024-4204µs ± 0%257µs ± 0%+25.94%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0064-443.9µs ± 0%61.9µs ± 0%+41.00%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0128-445.1µs ± 0%60.0µs ± 0%+33.23%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0256-449.4µs ± 0%60.7µs ± 0%+22.90%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:1024-466.8µs ± 0%77.0µs ± 0%+15.26%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0064-4335µs ± 0%438µs ± 0%+30.90%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0128-4329µs ± 0%445µs ± 0%+35.40%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0256-4355µs ± 0%439µs ± 0%+23.54%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0512-4401µs ± 0%560µs ± 0%+39.69%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:1024-4490µs ± 0%556µs ± 0%+13.45%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0064-443.8µs ± 0%62.1µs ± 0%+41.91%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0128-444.0µs ± 0%61.3µs ± 0%+39.19%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0256-445.2µs ± 0%62.7µs ± 0%+38.78%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0512-452.9µs ± 0%71.2µs ± 0%+34.68%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:1024-466.4µs ± 0%85.7µs ± 0%+28.97%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0064-4340µs ± 0%422µs ± 0%+24.19%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0128-4349µs ± 0%450µs ± 0%+28.89%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0256-4362µs ± 0%425µs ± 0%+17.57%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0512-4389µs ± 0%581µs ± 0%+49.28%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:1024-4499µs ± 0%537µs ± 0%+7.52%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0064-4138µs ± 0%138µs ± 0%+0.11%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0128-4130µs ± 0%149µs ± 0%+14.99%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0256-4125µs ± 0%140µs ± 0%+12.12%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0512-4130µs ± 0%164µs ± 0%+26.57%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:1024-4142µs ± 0%173µs ± 0%+22.07%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0064-41.24ms ± 0%1.39ms ± 0%+12.28%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0128-41.24ms ± 0%1.42ms ± 0%+14.26%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0512-41.26ms ± 0%1.30ms ± 0%+3.01%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:1024-41.40ms ± 0%1.74ms ± 0%+24.27%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0064-4118µs ± 0%124µs ± 0%+5.50%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0128-4117µs ± 0%163µs ± 0%+39.31%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0256-4120µs ± 0%140µs ± 0%+16.88%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0512-4125µs ± 0%140µs ± 0%+11.56%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:1024-4138µs ± 0%152µs ± 0%+10.23%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0064-41.20ms ± 0%1.29ms ± 0%+7.00%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0128-41.20ms ± 0%1.32ms ± 0%+9.76%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0256-41.21ms ± 0%1.36ms ± 0%+12.80%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0512-41.23ms ± 0%1.39ms ± 0%+13.18%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:1024-41.38ms ± 0%1.65ms ± 0%+20.09%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0064-48.30µs ± 0%10.20µs ± 0%+22.94%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0128-48.75µs ± 0%12.29µs ± 0%+40.43%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0256-410.4µs ± 0%11.3µs ± 0%+8.28%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0512-411.5µs ± 0%13.8µs ± 0%+20.14%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:1024-417.3µs ± 0%21.6µs ± 0%+24.84%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0064-489.6µs ± 0%110.9µs ± 0%+23.77%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0128-494.1µs ± 0%117.0µs ± 0%+24.26%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0256-4107µs ± 0%130µs ± 0%+21.85%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0512-4123µs ± 0%154µs ± 0%+25.47%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:1024-4147µs ± 0%197µs ± 0%+34.11%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0064-4126µs ± 0%142µs ± 0%+12.70%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0128-4127µs ± 0%146µs ± 0%+15.27%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0256-4128µs ± 0%155µs ± 0%+21.42%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0512-4132µs ± 0%150µs ± 0%+13.62%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:1024-4130µs ± 0%154µs ± 0%+18.18%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0064-41.26ms ± 0%1.44ms ± 0%+14.61%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0128-41.25ms ± 0%1.32ms ± 0%+5.93%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0256-41.23ms ± 0%1.52ms ± 0%+23.03%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0512-41.28ms ± 0%1.58ms ± 0%+23.71%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:1024-41.29ms ± 0%1.63ms ± 0%+26.80%(p=1.000 n=1+1)
 
✨ See Unchanged Results...
time/opdelta
 
🐋 See Full Results...
develop.txtcurrent.txt
time/opdelta
pkg:github.com/sourcenetwork/defradb/bench/collection goos:linux goarch:amd64
_Collection_UserSimple_CreateMany_Sync_0_10-411.0ms ± 0%13.1ms ± 0%+19.01%(p=1.000 n=1+1)
_Collection_UserSimple_CreateMany_Sync_0_100-4233ms ± 0%278ms ± 0%+19.03%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_10-410.8ms ± 0%13.0ms ± 0%+19.40%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_100-4102ms ± 0%128ms ± 0%+24.51%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_1000-41.06s ± 0%1.21s ± 0%+14.30%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_100-446.8ms ± 0%50.1ms ± 0%+6.90%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_1000-4446ms ± 0%469ms ± 0%+5.14%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_10000-44.65s ± 0%4.85s ± 0%+4.23%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_10_10-4406µs ± 0%363µs ± 0%−10.60%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_100_100-44.10ms ± 0%3.78ms ± 0%−7.76%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_1000-442.5ms ± 0%40.0ms ± 0%−5.84%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_10-4393µs ± 0%386µs ± 0%−1.67%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_100-43.91ms ± 0%3.94ms ± 0%+0.70%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_10_10-4250µs ± 0%318µs ± 0%+27.45%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_100_100-41.84ms ± 0%1.89ms ± 0%+2.68%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_1000-424.9ms ± 0%25.0ms ± 0%+0.50%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_10-4262µs ± 0%262µs ± 0%+0.18%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_100-41.88ms ± 0%1.88ms ± 0%−0.27%(p=1.000 n=1+1)
pkg:github.com/sourcenetwork/defradb/bench/query/simple goos:linux goarch:amd64
_Query_UserSimple_Query_Sync_10-4355µs ± 0%350µs ± 0%−1.50%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_100-41.17ms ± 0%1.42ms ± 0%+21.31%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_1000-49.50ms ± 0%10.83ms ± 0%+13.99%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_10-4414µs ± 0%532µs ± 0%+28.36%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_100-41.26ms ± 0%1.71ms ± 0%+35.21%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_1000-410.0ms ± 0%12.1ms ± 0%+20.56%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_10-4377µs ± 0%594µs ± 0%+57.47%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_100-4431µs ± 0%572µs ± 0%+32.58%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_1000-4435µs ± 0%486µs ± 0%+11.63%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_10-4644µs ± 0%834µs ± 0%+29.61%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_100-4645µs ± 0%983µs ± 0%+52.49%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_1000-4640µs ± 0%709µs ± 0%+10.88%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_10-4294µs ± 0%401µs ± 0%+36.17%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_100-4289µs ± 0%353µs ± 0%+22.18%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_1000-4282µs ± 0%277µs ± 0%−1.76%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_10-4417µs ± 0%507µs ± 0%+21.59%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_100-41.37ms ± 0%2.05ms ± 0%+49.31%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_1000-412.2ms ± 0%13.2ms ± 0%+8.34%(p=1.000 n=1+1)
pkg:github.com/sourcenetwork/defradb/bench/storage goos:linux goarch:amd64
_Storage_Simple_Read_Sync_1_10/ValueSize:0064-413.0µs ± 0%20.2µs ± 0%+56.07%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0128-413.3µs ± 0%17.6µs ± 0%+32.41%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0256-414.1µs ± 0%18.7µs ± 0%+32.84%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0512-415.2µs ± 0%21.3µs ± 0%+40.11%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:1024-419.0µs ± 0%29.2µs ± 0%+53.76%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0064-4124µs ± 0%174µs ± 0%+40.01%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0128-4130µs ± 0%177µs ± 0%+36.20%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0256-4140µs ± 0%186µs ± 0%+32.87%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0512-4157µs ± 0%204µs ± 0%+29.89%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:1024-4196µs ± 0%263µs ± 0%+34.24%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0064-414.7µs ± 0%18.8µs ± 0%+27.92%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0128-414.9µs ± 0%18.7µs ± 0%+25.23%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0256-415.4µs ± 0%24.5µs ± 0%+59.03%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0512-416.7µs ± 0%29.9µs ± 0%+78.78%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:1024-420.3µs ± 0%31.2µs ± 0%+54.12%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0064-4141µs ± 0%184µs ± 0%+30.93%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0128-4145µs ± 0%178µs ± 0%+22.91%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0256-4150µs ± 0%174µs ± 0%+16.01%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0512-4174µs ± 0%201µs ± 0%+15.85%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:1024-4204µs ± 0%257µs ± 0%+25.94%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0064-443.9µs ± 0%61.9µs ± 0%+41.00%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0128-445.1µs ± 0%60.0µs ± 0%+33.23%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0256-449.4µs ± 0%60.7µs ± 0%+22.90%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0512-457.3µs ± 0%56.6µs ± 0%−1.29%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:1024-466.8µs ± 0%77.0µs ± 0%+15.26%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0064-4335µs ± 0%438µs ± 0%+30.90%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0128-4329µs ± 0%445µs ± 0%+35.40%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0256-4355µs ± 0%439µs ± 0%+23.54%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0512-4401µs ± 0%560µs ± 0%+39.69%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:1024-4490µs ± 0%556µs ± 0%+13.45%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0064-443.8µs ± 0%62.1µs ± 0%+41.91%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0128-444.0µs ± 0%61.3µs ± 0%+39.19%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0256-445.2µs ± 0%62.7µs ± 0%+38.78%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0512-452.9µs ± 0%71.2µs ± 0%+34.68%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:1024-466.4µs ± 0%85.7µs ± 0%+28.97%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0064-4340µs ± 0%422µs ± 0%+24.19%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0128-4349µs ± 0%450µs ± 0%+28.89%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0256-4362µs ± 0%425µs ± 0%+17.57%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0512-4389µs ± 0%581µs ± 0%+49.28%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:1024-4499µs ± 0%537µs ± 0%+7.52%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0064-4138µs ± 0%138µs ± 0%+0.11%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0128-4130µs ± 0%149µs ± 0%+14.99%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0256-4125µs ± 0%140µs ± 0%+12.12%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0512-4130µs ± 0%164µs ± 0%+26.57%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:1024-4142µs ± 0%173µs ± 0%+22.07%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0064-41.24ms ± 0%1.39ms ± 0%+12.28%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0128-41.24ms ± 0%1.42ms ± 0%+14.26%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0256-41.25ms ± 0%1.23ms ± 0%−1.39%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0512-41.26ms ± 0%1.30ms ± 0%+3.01%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:1024-41.40ms ± 0%1.74ms ± 0%+24.27%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0064-4118µs ± 0%124µs ± 0%+5.50%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0128-4117µs ± 0%163µs ± 0%+39.31%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0256-4120µs ± 0%140µs ± 0%+16.88%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0512-4125µs ± 0%140µs ± 0%+11.56%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:1024-4138µs ± 0%152µs ± 0%+10.23%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0064-41.20ms ± 0%1.29ms ± 0%+7.00%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0128-41.20ms ± 0%1.32ms ± 0%+9.76%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0256-41.21ms ± 0%1.36ms ± 0%+12.80%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0512-41.23ms ± 0%1.39ms ± 0%+13.18%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:1024-41.38ms ± 0%1.65ms ± 0%+20.09%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0064-48.30µs ± 0%10.20µs ± 0%+22.94%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0128-48.75µs ± 0%12.29µs ± 0%+40.43%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0256-410.4µs ± 0%11.3µs ± 0%+8.28%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0512-411.5µs ± 0%13.8µs ± 0%+20.14%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:1024-417.3µs ± 0%21.6µs ± 0%+24.84%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0064-489.6µs ± 0%110.9µs ± 0%+23.77%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0128-494.1µs ± 0%117.0µs ± 0%+24.26%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0256-4107µs ± 0%130µs ± 0%+21.85%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0512-4123µs ± 0%154µs ± 0%+25.47%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:1024-4147µs ± 0%197µs ± 0%+34.11%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0064-4126µs ± 0%142µs ± 0%+12.70%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0128-4127µs ± 0%146µs ± 0%+15.27%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0256-4128µs ± 0%155µs ± 0%+21.42%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0512-4132µs ± 0%150µs ± 0%+13.62%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:1024-4130µs ± 0%154µs ± 0%+18.18%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0064-41.26ms ± 0%1.44ms ± 0%+14.61%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0128-41.25ms ± 0%1.32ms ± 0%+5.93%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0256-41.23ms ± 0%1.52ms ± 0%+23.03%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0512-41.28ms ± 0%1.58ms ± 0%+23.71%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:1024-41.29ms ± 0%1.63ms ± 0%+26.80%(p=1.000 n=1+1)
 

jsimnz
jsimnz previously requested changes Apr 28, 2022
Copy link
Member

@jsimnz jsimnz left a comment

Choose a reason for hiding this comment

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

Haven't completed everything yet, but wanted to submit what I got through atm.

@@ -30,6 +30,7 @@ const (
DocKeyFieldName = "_key"
CountFieldName = "_count"
SumFieldName = "_sum"
AverageFieldName = "_average"
Copy link
Member

Choose a reason for hiding this comment

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

_avg is also an option here for the query name. Might want to see what others think from a DX. Doesn't truely matter and easy change, just wanted to bring attention to it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

raised in discord

Copy link
Contributor

Choose a reason for hiding this comment

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

_average is more clear. If we add aliases later we could support both.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

leaving as _average only for now (Fred and Shahzad had minor preferences in opposite directions on discord)

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm now of the opinion that given our current set {_count, _sum, _min, _max} having short names, _avg does fit better. It's also very common to use avg so is not that much less clear than average. So, +1 for _avg here.

Copy link
Contributor Author

@AndrewSisley AndrewSisley Apr 29, 2022

Choose a reason for hiding this comment

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

I think that tips the vote slightly in favour of _avg - will change to _avg

  • _avg over _average
  • squash the commit before merge

count := 0
if hasCount {
typedCount, isInt := countProp.(int)
count = typedCount
Copy link
Member

Choose a reason for hiding this comment

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

extreme nitpick: The assingment should be after the isInt if check :)

Copy link
Contributor Author

@AndrewSisley AndrewSisley Apr 28, 2022

Choose a reason for hiding this comment

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

lol - yes it should be :)

  • check isInt first


count := 0
if hasCount {
typedCount, isInt := countProp.(int)
Copy link
Member

Choose a reason for hiding this comment

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

Wondering if its possible for count to be int64. Would need to look at the count code but you'd be more knowledgeable then me.

Copy link
Contributor Author

@AndrewSisley AndrewSisley Apr 28, 2022

Choose a reason for hiding this comment

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

Think I remember looking and the tests covering this, but will review

  • review typedCount cast

Copy link
Contributor Author

Choose a reason for hiding this comment

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

confirmed, count always returns int

@@ -69,6 +71,24 @@ func (n *countNode) Next() (bool, error) {
// v.Len will panic if v is not one of these types, we don't want it to panic
case reflect.Array, reflect.Chan, reflect.Map, reflect.Slice, reflect.String:
Copy link
Member

Choose a reason for hiding this comment

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

Just realized, is reflect.Chan needed here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

probably not, but I think when I wrote that I just included all the types the len function supported else the code could panic if we ever change the consuming code to send them in. Think a few/most of the others are also defensive/extra in that sense.

@@ -298,6 +359,80 @@ func (n *selectNode) initFields(parsed *parser.Select) ([]aggregateNode, error)
return aggregates, nil
}

func (n *selectNode) tryGetAggregateField(
Copy link
Member

Choose a reason for hiding this comment

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

Why is tryGetAggregateField and areAstValuesEqual on selectNode?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

partly scoping (nothing outside of that type calls this), partly I think laziness RE context (n.p.ctx)

Comment on lines 284 to 285
// Average utilises count and sum in order to calculate it's return value,
// so we have to add those nodes here if they do not exist
Copy link
Member

Choose a reason for hiding this comment

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

I assume the higher level render step will remove/filter out the _sum and _count fields being created here if they werent originally present in the query.

Copy link
Contributor Author

@AndrewSisley AndrewSisley Apr 28, 2022

Choose a reason for hiding this comment

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

correct - each 'rendered' field is explicitly copied to a clean/new map, if a field is not render-requested it never gets copied. All the query integration tests assert this correctness and will fail if 'extra' fields are returned

Arguments: f.Statement.Arguments,
}
// We need to make sure the new aggregate index does not clash with any existing aggregate fields
sumFieldIndex := (len(parsed.Fields) * fieldLenMultiplier) + sumFieldIndexOffset
Copy link
Member

Choose a reason for hiding this comment

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

Same q as above w.r.t fieldLenMultipler. I get why the offset is needed, just not the multipler. Is there somehow 3 field indexes for each parsed field?

Copy link
Contributor Author

@AndrewSisley AndrewSisley Apr 28, 2022

Choose a reason for hiding this comment

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

Yes, see answer on that comment

  • Make sure you document this instance too

}

if f.Statement.Name.Value == name {
allArguementsMatch := true
Copy link
Member

Choose a reason for hiding this comment

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

I assume we're trying to do a complete match between target field and current field.

IE:

users {
    _average(field: X. filter: Y, limit: Z)
    _count(field: X, filter: Y)
}

Wouldn't match here since the arguments would have an extra item found on _average that isn't on _count.

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 correct, and the above example you gave should not match (as the average should be calculated according to the limited results - with the internal count being <= Z).

Comment on lines 423 to 429
for i, innerValue := range thisTypedValue.Values {
if !n.areAstValuesEqual(innerValue, otherTypedValue.Values[i]) {
return false
}
Copy link
Member

Choose a reason for hiding this comment

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

I'm wondering if its actually possible for ListValues to contain different types

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 that is not permitted, at least by the lib we use - in generate we reference this quite a bit gql.ListObject has a property list.OfType - which contains a single type that is the type of every item in the list

Copy link
Member

Choose a reason for hiding this comment

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

If that is the case would it be sufficient to check the first element of each, instead of all elements?

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 than just a type check - is a deep equals comparing the values

Copy link
Member

Choose a reason for hiding this comment

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

ahh yes, true true. Not sure how I missed that.

Comment on lines 430 to 447
log.Error(
n.p.ctx,
"Could not evaluate arguement equality, unknown type.",
logging.NewKV("Type", fmt.Sprintf("%T", thisValue.GetValue())),
)
Copy link
Member

Choose a reason for hiding this comment

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

Don't know if log error is really that necessary, but its OK.

However, if you move this and the other func off selectNode as I mentioned in another comment, we wouldnt have access to n.p.ctx context object.

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, this log is one of the 2 main reasons it is scoped to the selectNode. Would not want to silently return false here (with no log) - this should never happen, but it will only cost the consumer performance-wise so a panic felt inappropriate (better it works a bit slowly than not at all).

Copy link
Member

Choose a reason for hiding this comment

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

Alternatively, we could just add an error to the return type, and bubble up the error else where in the call stack that can more appropriately log it with access to a context.

So moving these related funcs off selectNode wouldnt actually be problematic.

It depends if we concretely see this as an "error" rather than just a possible "false" case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alternatively, we could just add an error to the return type, and bubble up the error else where in the call stack that can more appropriately log it with access to a context.

Returning an error disrupts the flow and comes with the same problems as a panic, converting what is a minor performance hit into a disruptive and noticeable bug.

This log line really doesn't stop us from moving the function either, will just have to pass the context in some other way. If you are keen on dropping the function scope and making it package-global?

Copy link
Member

Choose a reason for hiding this comment

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

Try not to think of it as "package-global". Its often idiomatic go to assume a pure (im using pure to mean non-method) func and if need to be futher scope/group it onto a struct as a method. As far as packages go in Go, its perfectly fine to have w.e you need on the package scope.

I'm in the camp of keeping these kind of util funcs off of strucs (methods) if possible as I feel like it muddys up the goal of struct, and someone first reading it will assume it somehow relies on the functionality/state of the struct its a method on.

Can you explain what you mean by "disrupts the flow". If you mean how you call this func higher up, that can certainly be adjusted. Also not sure what you mean by "same problems as a panic". Returning the error means you are notifying the caller something went wrong (unexpected types in this case), and they should handle it appropriately. Dont see how returning an error here could cause bugs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you explain what you mean by "disrupts the flow"

The function returns false here, treating anything that hits the default case as something that requires a new node (instead of sharing). The user will receive their results as if it returned true, but probably slightly slower. If you return an error or panic they will instead receive an error, and they and their stakeholders might needlessly be a little upset with us.

Copy link
Contributor Author

@AndrewSisley AndrewSisley May 4, 2022

Choose a reason for hiding this comment

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

I'll make it global then. I think it is a bad idea though given that this function is only written to be called from a function on the selectNode and might do unexpected things if called from another context (and I'll have to pass context through), but it is not worth arguing over. I might do it in the new filter branch and merge this as-is tomorrow morning depending on how much this has changed over there.

  • drop scope

@AndrewSisley AndrewSisley requested a review from jsimnz April 28, 2022 18:10
@AndrewSisley AndrewSisley force-pushed the sisley/feat/I95-average branch from d99e20d to 1345eee Compare April 28, 2022 18:10
@source-devs

This comment was marked as duplicate.

@source-devs

This comment was marked as duplicate.

@source-devs

This comment was marked as duplicate.

@source-devs

This comment was marked as duplicate.

@source-devs

This comment was marked as duplicate.


for _, possibleMatchingArguement := range f.Statement.Arguments {
for _, targetArguement := range arguements {
if possibleMatchingArguement.Name != targetArguement.Name {
Copy link
Contributor Author

@AndrewSisley AndrewSisley Apr 29, 2022

Choose a reason for hiding this comment

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

This appears to always be true - review and fix

  • arguement name check issue

Copy link
Contributor Author

Choose a reason for hiding this comment

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

.Name is an object and I missed this, corrected with the following:

-  if possibleMatchingArguement.Name != targetArguement.Name {
+ if possibleMatchingArguement.Name.Value != targetArguement.Name.Value {

Copy link
Contributor Author

@AndrewSisley AndrewSisley Apr 29, 2022

Choose a reason for hiding this comment

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

Still needs a bit more work (falls through the switch to default atm). Sorry for the multiple pushes, am being lazy and relying on code-cov

  • fix type check

@source-devs

This comment was marked as duplicate.

@source-devs

This comment was marked as duplicate.

@AndrewSisley AndrewSisley force-pushed the sisley/feat/I95-average branch from e4cfa0c to 4a7f625 Compare April 29, 2022 19:02
@source-devs

This comment was marked as duplicate.

@source-devs

This comment was marked as duplicate.

@source-devs

This comment was marked as duplicate.

@AndrewSisley AndrewSisley force-pushed the sisley/feat/I95-average branch from 0a84b76 to 3414264 Compare May 2, 2022 14:43
@source-devs

This comment was marked as duplicate.

@AndrewSisley AndrewSisley force-pushed the sisley/feat/I95-average branch from fdb9ff2 to b453259 Compare May 4, 2022 15:47
@source-devs
Copy link

Benchmark Results

Summary

  • 113 Benchmarks successfully compared.
  • 65 Benchmarks were ✅ Better.
  • 48 Benchmarks were ❌ Worse .
  • 0 Benchmarks were ✨ Unchanged.
✅ See Better Results...
time/opdelta
_Collection_UserSimple_Create_Sync_0_10-410.8ms ± 0%10.6ms ± 0%−2.20%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_10000-44.65s ± 0%4.56s ± 0%−2.03%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_10_10-4406µs ± 0%345µs ± 0%−14.91%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_100_100-44.10ms ± 0%3.61ms ± 0%−11.97%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_1000-442.5ms ± 0%39.6ms ± 0%−6.99%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_10-4393µs ± 0%354µs ± 0%−9.93%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_100-43.91ms ± 0%3.87ms ± 0%−1.10%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_100_100-41.84ms ± 0%1.77ms ± 0%−3.65%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_1000-424.9ms ± 0%23.6ms ± 0%−4.97%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_10-4262µs ± 0%250µs ± 0%−4.63%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_100-41.88ms ± 0%1.81ms ± 0%−3.72%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_100-41.17ms ± 0%1.13ms ± 0%−3.70%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_1000-410.0ms ± 0%10.0ms ± 0%−0.30%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_10-4377µs ± 0%373µs ± 0%−1.03%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_100-4431µs ± 0%430µs ± 0%−0.36%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_1000-4435µs ± 0%430µs ± 0%−1.21%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_10-4294µs ± 0%270µs ± 0%−8.25%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_100-4289µs ± 0%270µs ± 0%−6.58%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_1000-4282µs ± 0%269µs ± 0%−4.82%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_10-4417µs ± 0%412µs ± 0%−1.18%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_100-41.37ms ± 0%1.35ms ± 0%−1.34%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_1000-412.2ms ± 0%12.2ms ± 0%−0.40%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0512-4157µs ± 0%154µs ± 0%−1.89%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:1024-4196µs ± 0%194µs ± 0%−0.95%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0064-414.7µs ± 0%14.4µs ± 0%−2.29%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0128-414.9µs ± 0%14.7µs ± 0%−1.82%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0256-415.4µs ± 0%15.1µs ± 0%−2.08%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:1024-420.3µs ± 0%20.1µs ± 0%−0.87%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0064-4141µs ± 0%137µs ± 0%−3.04%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0128-4145µs ± 0%141µs ± 0%−2.99%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0256-4150µs ± 0%147µs ± 0%−2.12%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0512-4174µs ± 0%156µs ± 0%−9.91%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:1024-4204µs ± 0%202µs ± 0%−1.41%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0512-457.3µs ± 0%57.1µs ± 0%−0.45%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0064-4138µs ± 0%114µs ± 0%−16.93%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0128-4130µs ± 0%120µs ± 0%−7.57%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0512-4130µs ± 0%123µs ± 0%−5.29%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:1024-4142µs ± 0%140µs ± 0%−1.43%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0128-41.24ms ± 0%1.18ms ± 0%−5.39%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0256-41.25ms ± 0%1.20ms ± 0%−3.81%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0512-41.26ms ± 0%1.22ms ± 0%−3.85%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:1024-41.40ms ± 0%1.36ms ± 0%−3.04%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0064-4118µs ± 0%111µs ± 0%−5.61%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0128-4117µs ± 0%115µs ± 0%−1.86%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0256-4120µs ± 0%117µs ± 0%−2.72%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0512-4125µs ± 0%120µs ± 0%−3.72%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:1024-4138µs ± 0%135µs ± 0%−2.13%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0064-41.20ms ± 0%1.16ms ± 0%−3.51%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0128-41.20ms ± 0%1.15ms ± 0%−4.44%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:1024-41.38ms ± 0%1.35ms ± 0%−1.53%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0256-410.4µs ± 0%10.1µs ± 0%−3.36%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0512-411.5µs ± 0%11.3µs ± 0%−2.15%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:1024-417.3µs ± 0%15.7µs ± 0%−9.05%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0128-494.1µs ± 0%90.1µs ± 0%−4.33%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0256-4107µs ± 0%97µs ± 0%−9.46%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0512-4123µs ± 0%113µs ± 0%−8.02%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0064-4126µs ± 0%122µs ± 0%−3.19%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0128-4127µs ± 0%126µs ± 0%−0.87%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0256-4128µs ± 0%124µs ± 0%−3.02%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0512-4132µs ± 0%129µs ± 0%−2.35%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:1024-4130µs ± 0%128µs ± 0%−1.28%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0064-41.26ms ± 0%1.24ms ± 0%−1.53%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0128-41.25ms ± 0%1.22ms ± 0%−1.87%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0512-41.28ms ± 0%1.24ms ± 0%−3.21%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:1024-41.29ms ± 0%1.27ms ± 0%−1.20%(p=1.000 n=1+1)
 
❌ See Worse Results...
time/opdelta
_Collection_UserSimple_CreateMany_Sync_0_100-4233ms ± 0%238ms ± 0%+1.99%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_100-4102ms ± 0%109ms ± 0%+5.93%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_1000-41.06s ± 0%1.18s ± 0%+11.87%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_100-446.8ms ± 0%48.1ms ± 0%+2.63%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_1000-4446ms ± 0%450ms ± 0%+0.87%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_10_10-4250µs ± 0%256µs ± 0%+2.45%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_1000-49.50ms ± 0%9.78ms ± 0%+3.00%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_10-4414µs ± 0%447µs ± 0%+7.91%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_100-41.26ms ± 0%1.29ms ± 0%+1.73%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_10-4644µs ± 0%676µs ± 0%+5.06%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_100-4645µs ± 0%694µs ± 0%+7.57%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_1000-4640µs ± 0%643µs ± 0%+0.42%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0128-413.3µs ± 0%13.5µs ± 0%+1.32%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0256-414.1µs ± 0%14.3µs ± 0%+1.34%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0512-415.2µs ± 0%15.3µs ± 0%+0.25%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:1024-419.0µs ± 0%19.3µs ± 0%+1.53%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0064-4124µs ± 0%130µs ± 0%+5.19%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0128-4130µs ± 0%148µs ± 0%+13.94%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0256-4140µs ± 0%146µs ± 0%+4.08%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0512-416.7µs ± 0%16.8µs ± 0%+0.44%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0064-443.9µs ± 0%45.1µs ± 0%+2.75%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0128-445.1µs ± 0%49.9µs ± 0%+10.65%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0256-449.4µs ± 0%57.5µs ± 0%+16.39%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:1024-466.8µs ± 0%68.5µs ± 0%+2.50%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0064-4335µs ± 0%400µs ± 0%+19.40%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0128-4329µs ± 0%374µs ± 0%+13.78%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0256-4355µs ± 0%404µs ± 0%+13.67%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0512-4401µs ± 0%450µs ± 0%+12.37%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:1024-4490µs ± 0%518µs ± 0%+5.54%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0064-443.8µs ± 0%52.7µs ± 0%+20.35%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0128-444.0µs ± 0%58.9µs ± 0%+33.75%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0256-445.2µs ± 0%53.7µs ± 0%+18.99%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0512-452.9µs ± 0%61.6µs ± 0%+16.60%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:1024-466.4µs ± 0%72.0µs ± 0%+8.38%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0064-4340µs ± 0%365µs ± 0%+7.43%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0128-4349µs ± 0%377µs ± 0%+7.96%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0256-4362µs ± 0%393µs ± 0%+8.55%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0512-4389µs ± 0%456µs ± 0%+17.20%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:1024-4499µs ± 0%507µs ± 0%+1.64%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0256-4125µs ± 0%127µs ± 0%+1.36%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0064-41.24ms ± 0%1.25ms ± 0%+0.50%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0256-41.21ms ± 0%1.22ms ± 0%+0.90%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0512-41.23ms ± 0%1.37ms ± 0%+11.65%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0064-48.30µs ± 0%9.17µs ± 0%+10.51%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0128-48.75µs ± 0%9.54µs ± 0%+9.02%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0064-489.6µs ± 0%92.1µs ± 0%+2.76%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:1024-4147µs ± 0%161µs ± 0%+9.29%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0256-41.23ms ± 0%1.24ms ± 0%+0.47%(p=1.000 n=1+1)
 
✨ See Unchanged Results...
time/opdelta
 
🐋 See Full Results...
develop.txtcurrent.txt
time/opdelta
pkg:github.com/sourcenetwork/defradb/bench/collection goos:linux goarch:amd64
_Collection_UserSimple_CreateMany_Sync_0_10-411.0ms ± 0%10.9ms ± 0%−1.62%(p=1.000 n=1+1)
_Collection_UserSimple_CreateMany_Sync_0_100-4233ms ± 0%238ms ± 0%+1.99%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_10-410.8ms ± 0%10.6ms ± 0%−2.20%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_100-4102ms ± 0%109ms ± 0%+5.93%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_1000-41.06s ± 0%1.18s ± 0%+11.87%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_100-446.8ms ± 0%48.1ms ± 0%+2.63%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_1000-4446ms ± 0%450ms ± 0%+0.87%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_10000-44.65s ± 0%4.56s ± 0%−2.03%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_10_10-4406µs ± 0%345µs ± 0%−14.91%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_100_100-44.10ms ± 0%3.61ms ± 0%−11.97%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_1000-442.5ms ± 0%39.6ms ± 0%−6.99%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_10-4393µs ± 0%354µs ± 0%−9.93%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_100-43.91ms ± 0%3.87ms ± 0%−1.10%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_10_10-4250µs ± 0%256µs ± 0%+2.45%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_100_100-41.84ms ± 0%1.77ms ± 0%−3.65%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_1000-424.9ms ± 0%23.6ms ± 0%−4.97%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_10-4262µs ± 0%250µs ± 0%−4.63%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_100-41.88ms ± 0%1.81ms ± 0%−3.72%(p=1.000 n=1+1)
pkg:github.com/sourcenetwork/defradb/bench/query/simple goos:linux goarch:amd64
_Query_UserSimple_Query_Sync_10-4355µs ± 0%331µs ± 0%−6.69%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_100-41.17ms ± 0%1.13ms ± 0%−3.70%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_1000-49.50ms ± 0%9.78ms ± 0%+3.00%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_10-4414µs ± 0%447µs ± 0%+7.91%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_100-41.26ms ± 0%1.29ms ± 0%+1.73%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_1000-410.0ms ± 0%10.0ms ± 0%−0.30%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_10-4377µs ± 0%373µs ± 0%−1.03%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_100-4431µs ± 0%430µs ± 0%−0.36%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_1000-4435µs ± 0%430µs ± 0%−1.21%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_10-4644µs ± 0%676µs ± 0%+5.06%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_100-4645µs ± 0%694µs ± 0%+7.57%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_1000-4640µs ± 0%643µs ± 0%+0.42%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_10-4294µs ± 0%270µs ± 0%−8.25%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_100-4289µs ± 0%270µs ± 0%−6.58%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_1000-4282µs ± 0%269µs ± 0%−4.82%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_10-4417µs ± 0%412µs ± 0%−1.18%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_100-41.37ms ± 0%1.35ms ± 0%−1.34%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_1000-412.2ms ± 0%12.2ms ± 0%−0.40%(p=1.000 n=1+1)
pkg:github.com/sourcenetwork/defradb/bench/storage goos:linux goarch:amd64
_Storage_Simple_Read_Sync_1_10/ValueSize:0064-413.0µs ± 0%12.6µs ± 0%−3.24%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0128-413.3µs ± 0%13.5µs ± 0%+1.32%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0256-414.1µs ± 0%14.3µs ± 0%+1.34%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0512-415.2µs ± 0%15.3µs ± 0%+0.25%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:1024-419.0µs ± 0%19.3µs ± 0%+1.53%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0064-4124µs ± 0%130µs ± 0%+5.19%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0128-4130µs ± 0%148µs ± 0%+13.94%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0256-4140µs ± 0%146µs ± 0%+4.08%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0512-4157µs ± 0%154µs ± 0%−1.89%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:1024-4196µs ± 0%194µs ± 0%−0.95%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0064-414.7µs ± 0%14.4µs ± 0%−2.29%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0128-414.9µs ± 0%14.7µs ± 0%−1.82%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0256-415.4µs ± 0%15.1µs ± 0%−2.08%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0512-416.7µs ± 0%16.8µs ± 0%+0.44%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:1024-420.3µs ± 0%20.1µs ± 0%−0.87%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0064-4141µs ± 0%137µs ± 0%−3.04%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0128-4145µs ± 0%141µs ± 0%−2.99%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0256-4150µs ± 0%147µs ± 0%−2.12%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0512-4174µs ± 0%156µs ± 0%−9.91%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:1024-4204µs ± 0%202µs ± 0%−1.41%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0064-443.9µs ± 0%45.1µs ± 0%+2.75%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0128-445.1µs ± 0%49.9µs ± 0%+10.65%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0256-449.4µs ± 0%57.5µs ± 0%+16.39%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0512-457.3µs ± 0%57.1µs ± 0%−0.45%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:1024-466.8µs ± 0%68.5µs ± 0%+2.50%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0064-4335µs ± 0%400µs ± 0%+19.40%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0128-4329µs ± 0%374µs ± 0%+13.78%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0256-4355µs ± 0%404µs ± 0%+13.67%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0512-4401µs ± 0%450µs ± 0%+12.37%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:1024-4490µs ± 0%518µs ± 0%+5.54%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0064-443.8µs ± 0%52.7µs ± 0%+20.35%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0128-444.0µs ± 0%58.9µs ± 0%+33.75%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0256-445.2µs ± 0%53.7µs ± 0%+18.99%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0512-452.9µs ± 0%61.6µs ± 0%+16.60%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:1024-466.4µs ± 0%72.0µs ± 0%+8.38%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0064-4340µs ± 0%365µs ± 0%+7.43%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0128-4349µs ± 0%377µs ± 0%+7.96%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0256-4362µs ± 0%393µs ± 0%+8.55%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0512-4389µs ± 0%456µs ± 0%+17.20%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:1024-4499µs ± 0%507µs ± 0%+1.64%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0064-4138µs ± 0%114µs ± 0%−16.93%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0128-4130µs ± 0%120µs ± 0%−7.57%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0256-4125µs ± 0%127µs ± 0%+1.36%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0512-4130µs ± 0%123µs ± 0%−5.29%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:1024-4142µs ± 0%140µs ± 0%−1.43%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0064-41.24ms ± 0%1.25ms ± 0%+0.50%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0128-41.24ms ± 0%1.18ms ± 0%−5.39%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0256-41.25ms ± 0%1.20ms ± 0%−3.81%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0512-41.26ms ± 0%1.22ms ± 0%−3.85%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:1024-41.40ms ± 0%1.36ms ± 0%−3.04%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0064-4118µs ± 0%111µs ± 0%−5.61%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0128-4117µs ± 0%115µs ± 0%−1.86%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0256-4120µs ± 0%117µs ± 0%−2.72%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0512-4125µs ± 0%120µs ± 0%−3.72%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:1024-4138µs ± 0%135µs ± 0%−2.13%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0064-41.20ms ± 0%1.16ms ± 0%−3.51%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0128-41.20ms ± 0%1.15ms ± 0%−4.44%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0256-41.21ms ± 0%1.22ms ± 0%+0.90%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0512-41.23ms ± 0%1.37ms ± 0%+11.65%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:1024-41.38ms ± 0%1.35ms ± 0%−1.53%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0064-48.30µs ± 0%9.17µs ± 0%+10.51%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0128-48.75µs ± 0%9.54µs ± 0%+9.02%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0256-410.4µs ± 0%10.1µs ± 0%−3.36%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0512-411.5µs ± 0%11.3µs ± 0%−2.15%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:1024-417.3µs ± 0%15.7µs ± 0%−9.05%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0064-489.6µs ± 0%92.1µs ± 0%+2.76%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0128-494.1µs ± 0%90.1µs ± 0%−4.33%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0256-4107µs ± 0%97µs ± 0%−9.46%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0512-4123µs ± 0%113µs ± 0%−8.02%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:1024-4147µs ± 0%161µs ± 0%+9.29%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0064-4126µs ± 0%122µs ± 0%−3.19%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0128-4127µs ± 0%126µs ± 0%−0.87%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0256-4128µs ± 0%124µs ± 0%−3.02%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0512-4132µs ± 0%129µs ± 0%−2.35%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:1024-4130µs ± 0%128µs ± 0%−1.28%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0064-41.26ms ± 0%1.24ms ± 0%−1.53%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0128-41.25ms ± 0%1.22ms ± 0%−1.87%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0256-41.23ms ± 0%1.24ms ± 0%+0.47%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0512-41.28ms ± 0%1.24ms ± 0%−3.21%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:1024-41.29ms ± 0%1.27ms ± 0%−1.20%(p=1.000 n=1+1)
 

@AndrewSisley AndrewSisley dismissed jsimnz’s stale review May 4, 2022 15:55

Requested changes made

@AndrewSisley AndrewSisley merged commit 6e7a01d into develop May 4, 2022
@AndrewSisley AndrewSisley deleted the sisley/feat/I95-average branch May 4, 2022 15:56
shahzadlone pushed a commit to shahzadlone/defradb that referenced this pull request Feb 23, 2024
* Rename SumBaseArg to NumericAggregateBaseArg

This can be shared between numeric aggregates

* Refactor numerical inline array selector

Can be shared between most aggregates

* Add average aggregate support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/query Related to the query component area/schema Related to the schema system feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Aggregate: Average
5 participants