MCPcopy
hub / github.com/google/mangle / EstimateFactCount

Method EstimateFactCount

factstore/factstore.go:150–156  ·  view source on GitHub ↗

EstimateFactCount returns the number of facts.

()

Source from the content-addressed store, hash-verified

148
149// EstimateFactCount returns the number of facts.
150func (s SimpleInMemoryStore) EstimateFactCount() int {
151 c := 0
152 for _, m := range s.shardsByPredicate {
153 c += len(m)
154 }
155 return c
156}
157
158// Add implements the FactStore interface by adding the fact to the backing map.
159func (s SimpleInMemoryStore) Add(a ast.Atom) bool {

Callers 7

testStoreFunction · 0.95
TestRoundTripFunction · 0.95
TestRewriteIdempotencyFunction · 0.95
TestSimpleEvalDeferFunction · 0.95
TestCreatedFactLimitFunction · 0.95
TestEvalExternalFunction · 0.95

Calls

no outgoing calls

Tested by 7

testStoreFunction · 0.76
TestRoundTripFunction · 0.76
TestRewriteIdempotencyFunction · 0.76
TestSimpleEvalDeferFunction · 0.76
TestCreatedFactLimitFunction · 0.76
TestEvalExternalFunction · 0.76