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

Unified Diff: tools/deep_memory_profiler/subcommands/policies.py

Issue 141563014: Make dmprof handle long runs better (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add notes to DumpList class documentation. Created 6 years, 11 months 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/subcommands/cat.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/deep_memory_profiler/subcommands/policies.py
diff --git a/tools/deep_memory_profiler/subcommands/policies.py b/tools/deep_memory_profiler/subcommands/policies.py
index 0b9181a3831d424baedd6769adff3b13634e60ff..5de1fe772b3f092f82a68aec921c8cfd9920ea81 100644
--- a/tools/deep_memory_profiler/subcommands/policies.py
+++ b/tools/deep_memory_profiler/subcommands/policies.py
@@ -299,9 +299,12 @@ class CSVCommand(PolicyCommands):
','.join(components), ',' * (max_components - len(components))))
LOGGER.info('Applying a policy %s to...' % label)
- for dump in dumps:
+ for index, dump in enumerate(dumps):
+ if index == 0:
+ first_dump_time = dump.time
component_sizes = self._apply_policy(
- dump, pfn_counts_dict, policy_set[label], bucket_set, dumps[0].time)
+ dump, pfn_counts_dict, policy_set[label], bucket_set,
+ first_dump_time)
s = []
for c in components:
if c in ('hour', 'minute', 'second'):
@@ -341,9 +344,12 @@ class JSONCommand(PolicyCommands):
}
LOGGER.info('Applying a policy %s to...' % label)
- for dump in dumps:
+ for index, dump in enumerate(dumps):
+ if index == 0:
+ first_dump_time = dump.time
component_sizes = self._apply_policy(
- dump, pfn_counts_dict, policy_set[label], bucket_set, dumps[0].time)
+ dump, pfn_counts_dict, policy_set[label], bucket_set,
+ first_dump_time)
component_sizes['dump_path'] = dump.path
component_sizes['dump_time'] = datetime.datetime.fromtimestamp(
dump.time).strftime('%Y-%m-%d %H:%M:%S')
« no previous file with comments | « tools/deep_memory_profiler/subcommands/cat.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698