Reduce graph.Iterator method names

This commit is contained in:
kortschak 2014-07-02 11:02:09 +09:30
parent e4fb5d2bb8
commit 8576f66d20
21 changed files with 115 additions and 98 deletions

View file

@ -192,7 +192,7 @@ func (it *Iterator) Size() (int64, bool) {
func (it *Iterator) DebugString(indent int) string {
size, _ := it.Size()
return fmt.Sprintf("%s(%s %d tags: %v dir: %s size:%d %s)", strings.Repeat(" ", indent), it.Type(), it.GetUid(), it.Tags(), it.dir, size, it.ts.GetNameFor(it.checkId))
return fmt.Sprintf("%s(%s %d tags: %v dir: %s size:%d %s)", strings.Repeat(" ", indent), it.Type(), it.UID(), it.Tags(), it.dir, size, it.ts.GetNameFor(it.checkId))
}
func (it *Iterator) Type() string { return "leveldb" }
@ -202,9 +202,9 @@ func (it *Iterator) Optimize() (graph.Iterator, bool) {
return it, false
}
func (it *Iterator) GetStats() *graph.IteratorStats {
func (it *Iterator) Stats() graph.IteratorStats {
s, _ := it.Size()
return &graph.IteratorStats{
return graph.IteratorStats{
CheckCost: 1,
NextCost: 2,
Size: s,