Skip to content

Commit

Permalink
iterator: get some rough size estimates for comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
dennwc committed Jan 6, 2018
1 parent 1f53d04 commit 463642e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion graph/iterator/regex.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,5 +195,6 @@ func (it *Regex) TagResults(dst map[string]graph.Value) {
}

func (it *Regex) Size() (int64, bool) {
return 0, false
sz, _ := it.subIt.Size()
return sz / 2, false
}
3 changes: 2 additions & 1 deletion graph/iterator/value_comparison.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,5 +279,6 @@ func (it *Comparison) Stats() graph.IteratorStats {
}

func (it *Comparison) Size() (int64, bool) {
return 0, false
sz, _ := it.subIt.Size()
return sz / 2, false
}

0 comments on commit 463642e

Please sign in to comment.