MCPcopy
hub / github.com/dgraph-io/dgraph / Length

Method Length

posting/list.go:1340–1344  ·  view source on GitHub ↗

Length iterates over the mutation layer and counts number of elements.

(readTs, afterUid uint64)

Source from the content-addressed store, hash-verified

1338
1339// Length iterates over the mutation layer and counts number of elements.
1340func (l *List) Length(readTs, afterUid uint64) int {
1341 l.RLock()
1342 defer l.RUnlock()
1343 return l.length(readTs, afterUid)
1344}
1345
1346// Rollup performs the rollup process, merging the immutable and mutable layers
1347// and outputting the resulting list so it can be written to disk.

Callers 13

rebuildCountIndexFunction · 0.45
TestAddMutation_jchiu1Function · 0.45
TestAddMutation_DelSetFunction · 0.45
TestAddMutation_DelReadFunction · 0.45
TestAddMutation_jchiu2Function · 0.45
TestAddMutation_jchiu3Function · 0.45
TestAddMutation_mrjn1Function · 0.45
TestAddMutation_mrjn2Function · 0.45
TestAfterUIDCountFunction · 0.45
TestAfterUIDCount2Function · 0.45
TestDeleteFunction · 0.45

Calls 3

lengthMethod · 0.95
RLockMethod · 0.80
RUnlockMethod · 0.80

Tested by 12

TestAddMutation_jchiu1Function · 0.36
TestAddMutation_DelSetFunction · 0.36
TestAddMutation_DelReadFunction · 0.36
TestAddMutation_jchiu2Function · 0.36
TestAddMutation_jchiu3Function · 0.36
TestAddMutation_mrjn1Function · 0.36
TestAddMutation_mrjn2Function · 0.36
TestAfterUIDCountFunction · 0.36
TestAfterUIDCount2Function · 0.36
TestDeleteFunction · 0.36