Home | History | Annotate | Download | only in logblame

Lines Matching refs:Bucket

14 class Bucket(object):
15 """Bucket of stats for a particular key managed by the Stats object."""
31 bucket = self._data.get(key)
32 if not bucket:
33 bucket = Bucket()
34 self._data[key] = bucket
35 bucket.count += 1
36 bucket.memory += logLine.memory()
37 bucket.lines.append(logLine)
43 return [(key, bucket) for key, bucket in self._data.iteritems()]
112 def WriteResult(totalCount, totalMemory, bucket, text):
113 """Write a bucket in the normalized format."""
114 print "%7d (%2d%%) %s (%2d%%) %s" % (bucket.count, (100 * bucket.count / totalCount),
115 FormatMemory(bucket.memory), (100 * bucket.memory / totalMemory), text)