Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Unified Diff: tools/deep_memory_profiler/lib/dump.py

Issue 754203004: There is a cyclic import in dmprof Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/deep_memory_profiler/lib/deep_dump.py ('k') | tools/deep_memory_profiler/lib/dumplist.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 798763a1f529691bf86a91a6a9cd3aac4ffbd1b2..64a86f80b20eea0365e7e1ccc6557fe201570518 100644
--- a/tools/deep_memory_profiler/lib/dump.py
+++ b/tools/deep_memory_profiler/lib/dump.py
@@ -3,8 +3,6 @@
# found in the LICENSE file.
import logging
-import os
-
LOGGER = logging.getLogger('dmprof')
@@ -71,35 +69,4 @@ class Dump(object):
Raises:
ParsingException for invalid heap profile dumps.
"""
- from lib.deep_dump import DeepDump
- dump = DeepDump(path, os.stat(path).st_mtime)
- with open(path, 'r') as f:
- dump.load_file(f, log_header)
- return dump
-
-
-class DumpList(object):
- """Represents a sequence of heap profile dumps.
-
- Individual dumps are loaded into memory lazily as the sequence is accessed,
- either while being iterated through or randomly accessed. Loaded dumps are
- not cached, meaning a newly loaded Dump object is returned every time an
- element in the list is accessed.
- """
-
- def __init__(self, dump_path_list):
- self._dump_path_list = dump_path_list
-
- @staticmethod
- def load(path_list):
- return DumpList(path_list)
-
- def __len__(self):
- return len(self._dump_path_list)
-
- def __iter__(self):
- for dump in self._dump_path_list:
- yield Dump.load(dump)
-
- def __getitem__(self, index):
- return Dump.load(self._dump_path_list[index])
+ raise NotImplementedError
« no previous file with comments | « tools/deep_memory_profiler/lib/deep_dump.py ('k') | tools/deep_memory_profiler/lib/dumplist.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698