Chromium Code Reviews| Index: tools/deep_memory_profiler/lib/dump.py |
| diff --git a/tools/deep_memory_profiler/lib/dump.py b/tools/deep_memory_profiler/lib/dump.py |
| index dc4b89840c09b3afb1466979b3813f39afdb0612..9f394d772b44561e847485eb2d77568b42371205 100644 |
| --- a/tools/deep_memory_profiler/lib/dump.py |
| +++ b/tools/deep_memory_profiler/lib/dump.py |
| @@ -409,26 +409,22 @@ class Dump(object): |
| class DumpList(object): |
| """Represents a sequence of heap profile dumps.""" |
|
Dai Mikurube (NOT FULLTIME)
2014/02/03 07:00:24
Could you add some comments that describes
* It lo
Jens Widell
2014/02/03 07:29:58
Some notes to that effect added.
|
| - def __init__(self, dump_list): |
| - self._dump_list = dump_list |
| + def __init__(self, dump_path_list): |
| + self._dump_path_list = dump_path_list |
| @staticmethod |
| def load(path_list): |
| - LOGGER.info('Loading heap dump profiles.') |
| - dump_list = [] |
| - for path in path_list: |
| - dump_list.append(Dump.load(path, ' ')) |
| - return DumpList(dump_list) |
| + return DumpList(path_list) |
| def __len__(self): |
| - return len(self._dump_list) |
| + return len(self._dump_path_list) |
| def __iter__(self): |
| - for dump in self._dump_list: |
| - yield dump |
| + for dump in self._dump_path_list: |
| + yield Dump.load(dump) |
| def __getitem__(self, index): |
| - return self._dump_list[index] |
| + return Dump.load(self._dump_path_list[index]) |
| class ProcMapsEntryAttribute(ExclusiveRangeDict.RangeAttribute): |