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

Method EstimateFactCount

factstore/factstore.go:259–265  ·  view source on GitHub ↗

EstimateFactCount implements a FactStore method. The result is an overestimate, because facts may be stored multiple times.

()

Source from the content-addressed store, hash-verified

257// EstimateFactCount implements a FactStore method. The result
258// is an overestimate, because facts may be stored multiple times.
259func (s MergedStore) EstimateFactCount() int {
260 var estimatedTotal int
261 for _, store := range s.readStore {
262 estimatedTotal += store.EstimateFactCount()
263 }
264 return estimatedTotal + s.writeStore.EstimateFactCount()
265}
266
267// ListPredicates returns a merged list of predicates.
268func (s MergedStore) ListPredicates() []ast.PredicateSym {

Callers

nothing calls this directly

Calls 1

EstimateFactCountMethod · 0.65

Tested by

no test coverage detected