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 ability to explain updateNode attributes. #514

Merged
merged 1 commit into from
Jun 14, 2022

Conversation

shahzadlone
Copy link
Member

@shahzadlone shahzadlone commented Jun 10, 2022

RELEVANT ISSUE(S)

Resolves #483

DESCRIPTION

Add the attributes for update node that we want to see in the explainable response.

Request:

mutation @explain {
	update_user(
		ids: [
			"bae-0a24cf29-b2c2-5861-9d00-abd6250c475d",
			"bae-958c9334-73cf-5695-bf06-cf06826babfa"
		],
		data: "{\"points\": 59}"
	) {
		_key
		name
		points
	}
}

Response:

"explain": {
	"updateNode": {
		"data": {
			"points": float64(59),
		}
		"filter": nil,
		"ids": []string{
			"bae-0a24cf29-b2c2-5861-9d00-abd6250c475d",
			"bae-958c9334-73cf-5695-bf06-cf06826babfa",
		}
		"selectTopNode": {
			"renderNode": {
				"selectNode": {
					"filter": nil,
					"scanNode": {
						"collectionID":   "1",
						"collectionName": "user",
						"filter":         nil,
						"spans":          []{},
					}
				}
			}
		}
	}
}

HOW HAS THIS BEEN TESTED?

Locally and Integration Tests

CHECKLIST:

  • I have commented the code, particularly in hard-to-understand areas.
  • I have made sure that the PR title adheres to the conventional commit style (subset of the ones we use can be found under: tools/configs/chglog/config.yml

ENVIRONMENT / OS THIS WAS TESTED ON?

Please specify which of the following was this tested on (remove or add your own):

  • Arch Linux

@shahzadlone shahzadlone added feature New feature or request area/query Related to the query component area/testing Related to any test or testing suite labels Jun 10, 2022
@shahzadlone shahzadlone added this to the DefraDB v0.3 milestone Jun 10, 2022
@shahzadlone shahzadlone self-assigned this Jun 10, 2022
@shahzadlone shahzadlone added the action/no-benchmark Skips the action that runs the benchmark. label Jun 10, 2022
@shahzadlone shahzadlone force-pushed the lone/feat/explain-update-node-attributes branch 2 times, most recently from 6e49eda to e4ba64a Compare June 10, 2022 16:54
@AndrewSisley
Copy link
Contributor

Looks like you are missing the selects and stuff? If you change

func (n *updateNode) Source() planNode { return nil }

to:

func (n *updateNode) Source() planNode { return n.results }

You should get all of the other stuff

@source-devs
Copy link

Benchmark Results

Summary

  • 113 Benchmarks successfully compared.
  • 107 Benchmarks were ✅ Better.
  • 6 Benchmarks were ❌ Worse .
  • 0 Benchmarks were ✨ Unchanged.
✅ See Better Results...
time/opdelta
_Collection_UserSimple_CreateMany_Sync_0_100-4295ms ± 0%277ms ± 0%−5.96%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_10-412.3ms ± 0%11.9ms ± 0%−3.43%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_100-4119ms ± 0%106ms ± 0%−10.39%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_1000-41.36s ± 0%1.02s ± 0%−25.16%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_100-455.1ms ± 0%46.5ms ± 0%−15.60%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_1000-4470ms ± 0%453ms ± 0%−3.56%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_10000-44.81s ± 0%4.75s ± 0%−1.31%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_100_100-44.12ms ± 0%3.71ms ± 0%−9.93%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_1000-441.3ms ± 0%40.1ms ± 0%−3.04%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_100-43.97ms ± 0%3.82ms ± 0%−3.81%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_10_10-4297µs ± 0%256µs ± 0%−13.91%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_100_100-42.40ms ± 0%1.85ms ± 0%−22.87%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_1000-424.3ms ± 0%24.2ms ± 0%−0.46%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_10-4272µs ± 0%257µs ± 0%−5.44%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_100-42.06ms ± 0%1.88ms ± 0%−8.54%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_100-41.58ms ± 0%1.36ms ± 0%−13.91%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_1000-413.4ms ± 0%10.0ms ± 0%−25.09%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_10-4581µs ± 0%432µs ± 0%−25.67%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_100-41.60ms ± 0%1.27ms ± 0%−20.23%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_1000-411.6ms ± 0%10.4ms ± 0%−9.67%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_10-4505µs ± 0%394µs ± 0%−21.92%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_100-4646µs ± 0%483µs ± 0%−25.17%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_1000-4508µs ± 0%439µs ± 0%−13.60%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_10-41.01ms ± 0%0.65ms ± 0%−35.82%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_100-4898µs ± 0%643µs ± 0%−28.46%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_1000-4719µs ± 0%653µs ± 0%−9.22%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_10-4328µs ± 0%270µs ± 0%−17.42%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_100-4368µs ± 0%293µs ± 0%−20.28%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_1000-4301µs ± 0%273µs ± 0%−9.35%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_10-4537µs ± 0%424µs ± 0%−21.16%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_100-41.87ms ± 0%1.46ms ± 0%−21.93%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_1000-416.9ms ± 0%12.3ms ± 0%−27.22%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0128-417.6µs ± 0%13.4µs ± 0%−23.39%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0256-418.9µs ± 0%14.2µs ± 0%−25.07%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0512-419.8µs ± 0%16.0µs ± 0%−19.30%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:1024-425.5µs ± 0%20.0µs ± 0%−21.65%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0064-4189µs ± 0%127µs ± 0%−32.44%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0128-4206µs ± 0%140µs ± 0%−32.12%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0256-4194µs ± 0%145µs ± 0%−25.45%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0512-4234µs ± 0%157µs ± 0%−33.20%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:1024-4274µs ± 0%191µs ± 0%−30.18%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0064-419.4µs ± 0%15.5µs ± 0%−20.28%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0128-422.4µs ± 0%16.8µs ± 0%−25.33%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0256-426.6µs ± 0%15.8µs ± 0%−40.52%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0512-426.7µs ± 0%17.4µs ± 0%−35.04%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:1024-437.0µs ± 0%20.9µs ± 0%−43.56%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0064-4224µs ± 0%142µs ± 0%−36.86%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0128-4213µs ± 0%140µs ± 0%−34.29%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0256-4180µs ± 0%157µs ± 0%−12.82%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0512-4229µs ± 0%184µs ± 0%−19.73%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:1024-4280µs ± 0%214µs ± 0%−23.85%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0064-459.7µs ± 0%46.9µs ± 0%−21.41%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0128-459.6µs ± 0%45.2µs ± 0%−24.09%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0256-461.2µs ± 0%48.4µs ± 0%−20.92%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0512-472.4µs ± 0%53.5µs ± 0%−26.19%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:1024-484.7µs ± 0%66.3µs ± 0%−21.78%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0064-4555µs ± 0%348µs ± 0%−37.25%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0128-4634µs ± 0%350µs ± 0%−44.74%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0256-4535µs ± 0%357µs ± 0%−33.26%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0512-4705µs ± 0%406µs ± 0%−42.49%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:1024-4696µs ± 0%474µs ± 0%−31.95%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0064-452.7µs ± 0%46.2µs ± 0%−12.29%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0128-455.1µs ± 0%43.3µs ± 0%−21.27%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0256-453.3µs ± 0%45.7µs ± 0%−14.19%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0512-472.3µs ± 0%52.0µs ± 0%−27.98%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:1024-480.7µs ± 0%64.2µs ± 0%−20.41%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0064-4428µs ± 0%363µs ± 0%−15.20%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0128-4390µs ± 0%344µs ± 0%−11.66%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0256-4426µs ± 0%363µs ± 0%−14.65%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0512-4451µs ± 0%398µs ± 0%−11.79%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:1024-4502µs ± 0%482µs ± 0%−3.96%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0064-4136µs ± 0%117µs ± 0%−13.79%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0128-4123µs ± 0%116µs ± 0%−6.01%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0256-4133µs ± 0%120µs ± 0%−9.86%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0512-4160µs ± 0%125µs ± 0%−21.88%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:1024-4181µs ± 0%139µs ± 0%−23.48%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0064-41.49ms ± 0%1.16ms ± 0%−22.06%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0128-41.54ms ± 0%1.16ms ± 0%−24.57%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0256-41.60ms ± 0%1.30ms ± 0%−18.56%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0512-41.55ms ± 0%1.23ms ± 0%−20.43%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:1024-41.81ms ± 0%1.34ms ± 0%−26.06%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0064-4143µs ± 0%110µs ± 0%−22.90%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0128-4141µs ± 0%111µs ± 0%−21.84%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0256-4136µs ± 0%117µs ± 0%−14.07%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0512-4153µs ± 0%139µs ± 0%−8.92%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:1024-4162µs ± 0%146µs ± 0%−9.78%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0064-41.33ms ± 0%1.18ms ± 0%−11.20%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0128-41.51ms ± 0%1.13ms ± 0%−25.34%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0256-41.30ms ± 0%1.15ms ± 0%−11.55%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0512-41.33ms ± 0%1.18ms ± 0%−11.33%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:1024-41.55ms ± 0%1.34ms ± 0%−13.81%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0064-49.16µs ± 0%8.49µs ± 0%−7.26%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0128-411.6µs ± 0%8.7µs ± 0%−24.94%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0512-415.7µs ± 0%11.2µs ± 0%−28.54%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:1024-417.9µs ± 0%17.7µs ± 0%−0.88%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0128-4116µs ± 0%106µs ± 0%−8.68%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0256-4122µs ± 0%111µs ± 0%−8.89%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0512-4140µs ± 0%138µs ± 0%−1.26%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:1024-4194µs ± 0%158µs ± 0%−18.40%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0064-4136µs ± 0%128µs ± 0%−5.78%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0128-4133µs ± 0%123µs ± 0%−7.63%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0256-4142µs ± 0%132µs ± 0%−6.60%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0512-4138µs ± 0%125µs ± 0%−9.32%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:1024-4139µs ± 0%131µs ± 0%−5.40%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0256-41.31ms ± 0%1.28ms ± 0%−1.75%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0512-41.30ms ± 0%1.24ms ± 0%−4.76%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:1024-41.38ms ± 0%1.32ms ± 0%−4.38%(p=1.000 n=1+1)
 
❌ See Worse Results...
time/opdelta
_Collection_UserSimple_Read_Sync_10_10-4354µs ± 0%359µs ± 0%+1.38%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_10-4372µs ± 0%380µs ± 0%+2.27%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0256-410.8µs ± 0%10.9µs ± 0%+1.18%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0064-4102µs ± 0%128µs ± 0%+24.96%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0064-41.35ms ± 0%1.44ms ± 0%+6.15%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0128-41.24ms ± 0%1.26ms ± 0%+2.18%(p=1.000 n=1+1)
 
✨ See Unchanged Results...
time/opdelta
 
🐋 See Full Results...
develop.txtcurrent.txt
time/opdelta
pkg:collection goos:linux goarch:amd64
_Collection_UserSimple_CreateMany_Sync_0_10-411.5ms ± 0%10.9ms ± 0%−4.97%(p=1.000 n=1+1)
_Collection_UserSimple_CreateMany_Sync_0_100-4295ms ± 0%277ms ± 0%−5.96%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_10-412.3ms ± 0%11.9ms ± 0%−3.43%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_100-4119ms ± 0%106ms ± 0%−10.39%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Sync_0_1000-41.36s ± 0%1.02s ± 0%−25.16%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_100-455.1ms ± 0%46.5ms ± 0%−15.60%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_1000-4470ms ± 0%453ms ± 0%−3.56%(p=1.000 n=1+1)
_Collection_UserSimple_Create_Async_0_10000-44.81s ± 0%4.75s ± 0%−1.31%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_10_10-4354µs ± 0%359µs ± 0%+1.38%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_100_100-44.12ms ± 0%3.71ms ± 0%−9.93%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_1000-441.3ms ± 0%40.1ms ± 0%−3.04%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_10-4372µs ± 0%380µs ± 0%+2.27%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Sync_1000_100-43.97ms ± 0%3.82ms ± 0%−3.81%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_10_10-4297µs ± 0%256µs ± 0%−13.91%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_100_100-42.40ms ± 0%1.85ms ± 0%−22.87%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_1000-424.3ms ± 0%24.2ms ± 0%−0.46%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_10-4272µs ± 0%257µs ± 0%−5.44%(p=1.000 n=1+1)
_Collection_UserSimple_Read_Async_1000_100-42.06ms ± 0%1.88ms ± 0%−8.54%(p=1.000 n=1+1)
pkg:query/simple goos:linux goarch:amd64
_Query_UserSimple_Query_Sync_10-4427µs ± 0%361µs ± 0%−15.56%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_100-41.58ms ± 0%1.36ms ± 0%−13.91%(p=1.000 n=1+1)
_Query_UserSimple_Query_Sync_1000-413.4ms ± 0%10.0ms ± 0%−25.09%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_10-4581µs ± 0%432µs ± 0%−25.67%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_100-41.60ms ± 0%1.27ms ± 0%−20.23%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithFilter_Sync_1000-411.6ms ± 0%10.4ms ± 0%−9.67%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_10-4505µs ± 0%394µs ± 0%−21.92%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_100-4646µs ± 0%483µs ± 0%−25.17%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithLimitOffset_Sync_1000-4508µs ± 0%439µs ± 0%−13.60%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_10-41.01ms ± 0%0.65ms ± 0%−35.82%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_100-4898µs ± 0%643µs ± 0%−28.46%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithMultiLookup_Sync_1000-4719µs ± 0%653µs ± 0%−9.22%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_10-4328µs ± 0%270µs ± 0%−17.42%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_100-4368µs ± 0%293µs ± 0%−20.28%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSingleLookup_Sync_1000-4301µs ± 0%273µs ± 0%−9.35%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_10-4537µs ± 0%424µs ± 0%−21.16%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_100-41.87ms ± 0%1.46ms ± 0%−21.93%(p=1.000 n=1+1)
_Query_UserSimple_Query_WithSort_Sync_1000-416.9ms ± 0%12.3ms ± 0%−27.22%(p=1.000 n=1+1)
pkg:storage goos:linux goarch:amd64
_Storage_Simple_Read_Sync_1_10/ValueSize:0064-417.6µs ± 0%14.0µs ± 0%−20.16%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0128-417.6µs ± 0%13.4µs ± 0%−23.39%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0256-418.9µs ± 0%14.2µs ± 0%−25.07%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:0512-419.8µs ± 0%16.0µs ± 0%−19.30%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_10/ValueSize:1024-425.5µs ± 0%20.0µs ± 0%−21.65%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0064-4189µs ± 0%127µs ± 0%−32.44%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0128-4206µs ± 0%140µs ± 0%−32.12%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0256-4194µs ± 0%145µs ± 0%−25.45%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:0512-4234µs ± 0%157µs ± 0%−33.20%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_1_100/ValueSize:1024-4274µs ± 0%191µs ± 0%−30.18%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0064-419.4µs ± 0%15.5µs ± 0%−20.28%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0128-422.4µs ± 0%16.8µs ± 0%−25.33%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0256-426.6µs ± 0%15.8µs ± 0%−40.52%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:0512-426.7µs ± 0%17.4µs ± 0%−35.04%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_10/ValueSize:1024-437.0µs ± 0%20.9µs ± 0%−43.56%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0064-4224µs ± 0%142µs ± 0%−36.86%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0128-4213µs ± 0%140µs ± 0%−34.29%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0256-4180µs ± 0%157µs ± 0%−12.82%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:0512-4229µs ± 0%184µs ± 0%−19.73%(p=1.000 n=1+1)
_Storage_Simple_Read_Sync_100_100/ValueSize:1024-4280µs ± 0%214µs ± 0%−23.85%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0064-459.7µs ± 0%46.9µs ± 0%−21.41%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0128-459.6µs ± 0%45.2µs ± 0%−24.09%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0256-461.2µs ± 0%48.4µs ± 0%−20.92%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:0512-472.4µs ± 0%53.5µs ± 0%−26.19%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_10/ValueSize:1024-484.7µs ± 0%66.3µs ± 0%−21.78%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0064-4555µs ± 0%348µs ± 0%−37.25%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0128-4634µs ± 0%350µs ± 0%−44.74%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0256-4535µs ± 0%357µs ± 0%−33.26%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:0512-4705µs ± 0%406µs ± 0%−42.49%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_0_100/ValueSize:1024-4696µs ± 0%474µs ± 0%−31.95%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0064-452.7µs ± 0%46.2µs ± 0%−12.29%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0128-455.1µs ± 0%43.3µs ± 0%−21.27%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0256-453.3µs ± 0%45.7µs ± 0%−14.19%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:0512-472.3µs ± 0%52.0µs ± 0%−27.98%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_10/ValueSize:1024-480.7µs ± 0%64.2µs ± 0%−20.41%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0064-4428µs ± 0%363µs ± 0%−15.20%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0128-4390µs ± 0%344µs ± 0%−11.66%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0256-4426µs ± 0%363µs ± 0%−14.65%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:0512-4451µs ± 0%398µs ± 0%−11.79%(p=1.000 n=1+1)
_Storage_Simple_WriteMany_Sync_100_100/ValueSize:1024-4502µs ± 0%482µs ± 0%−3.96%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0064-4136µs ± 0%117µs ± 0%−13.79%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0128-4123µs ± 0%116µs ± 0%−6.01%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0256-4133µs ± 0%120µs ± 0%−9.86%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:0512-4160µs ± 0%125µs ± 0%−21.88%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_10/ValueSize:1024-4181µs ± 0%139µs ± 0%−23.48%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0064-41.49ms ± 0%1.16ms ± 0%−22.06%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0128-41.54ms ± 0%1.16ms ± 0%−24.57%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0256-41.60ms ± 0%1.30ms ± 0%−18.56%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:0512-41.55ms ± 0%1.23ms ± 0%−20.43%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_0_100/ValueSize:1024-41.81ms ± 0%1.34ms ± 0%−26.06%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0064-4143µs ± 0%110µs ± 0%−22.90%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0128-4141µs ± 0%111µs ± 0%−21.84%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0256-4136µs ± 0%117µs ± 0%−14.07%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:0512-4153µs ± 0%139µs ± 0%−8.92%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_10/ValueSize:1024-4162µs ± 0%146µs ± 0%−9.78%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0064-41.33ms ± 0%1.18ms ± 0%−11.20%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0128-41.51ms ± 0%1.13ms ± 0%−25.34%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0256-41.30ms ± 0%1.15ms ± 0%−11.55%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:0512-41.33ms ± 0%1.18ms ± 0%−11.33%(p=1.000 n=1+1)
_Storage_Simple_Write_Sync_100_100/ValueSize:1024-41.55ms ± 0%1.34ms ± 0%−13.81%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0064-49.16µs ± 0%8.49µs ± 0%−7.26%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0128-411.6µs ± 0%8.7µs ± 0%−24.94%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0256-410.8µs ± 0%10.9µs ± 0%+1.18%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:0512-415.7µs ± 0%11.2µs ± 0%−28.54%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_10_10/ValueSize:1024-417.9µs ± 0%17.7µs ± 0%−0.88%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0064-4102µs ± 0%128µs ± 0%+24.96%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0128-4116µs ± 0%106µs ± 0%−8.68%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0256-4122µs ± 0%111µs ± 0%−8.89%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:0512-4140µs ± 0%138µs ± 0%−1.26%(p=1.000 n=1+1)
_Storage_Simple_Txn_Read_Sync_100_100/ValueSize:1024-4194µs ± 0%158µs ± 0%−18.40%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0064-4136µs ± 0%128µs ± 0%−5.78%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0128-4133µs ± 0%123µs ± 0%−7.63%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0256-4142µs ± 0%132µs ± 0%−6.60%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:0512-4138µs ± 0%125µs ± 0%−9.32%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_10_1_10/ValueSize:1024-4139µs ± 0%131µs ± 0%−5.40%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0064-41.35ms ± 0%1.44ms ± 0%+6.15%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0128-41.24ms ± 0%1.26ms ± 0%+2.18%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0256-41.31ms ± 0%1.28ms ± 0%−1.75%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:0512-41.30ms ± 0%1.24ms ± 0%−4.76%(p=1.000 n=1+1)
_Storage_Simple_Txn_Iterator_Sync_100_1_100/ValueSize:1024-41.38ms ± 0%1.32ms ± 0%−4.38%(p=1.000 n=1+1)
 

@codecov
Copy link

codecov bot commented Jun 10, 2022

Codecov Report

Merging #514 (2e6f67d) into develop (64ea968) will increase coverage by 0.09%.
The diff coverage is 85.00%.

❗ Current head 2e6f67d differs from pull request most recent head 630ad06. Consider uploading reports for the commit 630ad06 to get more accurate results

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #514      +/-   ##
===========================================
+ Coverage    54.32%   54.41%   +0.09%     
===========================================
  Files           97       97              
  Lines        13158    13176      +18     
===========================================
+ Hits          7148     7170      +22     
+ Misses        5331     5327       -4     
  Partials       679      679              
Impacted Files Coverage Δ
query/graphql/planner/update.go 74.59% <85.00%> (+5.35%) ⬆️
db/fetcher/fetcher.go 61.03% <0.00%> (+1.29%) ⬆️

@shahzadlone shahzadlone force-pushed the lone/feat/explain-update-node-attributes branch from 2e6f67d to 630ad06 Compare June 10, 2022 22:57
Copy link
Contributor

@AndrewSisley AndrewSisley left a comment

Choose a reason for hiding this comment

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

Looks good, cheers for tweaking Source()!

@shahzadlone shahzadlone merged commit f020961 into develop Jun 14, 2022
@shahzadlone shahzadlone deleted the lone/feat/explain-update-node-attributes branch June 14, 2022 16:12
shahzadlone added a commit to shahzadlone/defradb that referenced this pull request Feb 23, 2024
)

- Resolves sourcenetwork#483 

- Add the attributes for `updateNode` that we want to see in the explainable response.

Request:
```
mutation @Explain {
	update_user(
		ids: [
			"bae-0a24cf29-b2c2-5861-9d00-abd6250c475d",
			"bae-958c9334-73cf-5695-bf06-cf06826babfa"
		],
		data: "{\"points\": 59}"
	) {
		_key
		name
		points
	}
}
```

Response: 
```
"explain": {
	"updateNode": {
		"data": {
			"points": float64(59),
		}
		"filter": nil,
		"ids": []string{
			"bae-0a24cf29-b2c2-5861-9d00-abd6250c475d",
			"bae-958c9334-73cf-5695-bf06-cf06826babfa",
		}
		"selectTopNode": {
			"renderNode": {
				"selectNode": {
					"filter": nil,
					"scanNode": {
						"collectionID":   "1",
						"collectionName": "user",
						"filter":         nil,
						"spans":          []{},
					}
				}
			}
		}
	}
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/no-benchmark Skips the action that runs the benchmark. area/query Related to the query component area/testing Related to any test or testing suite feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Explain the attributes of updateNode.
3 participants