diff options
author | Lars Wirzenius <liw@liw.fi> | 2011-12-02 18:21:38 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2011-12-02 18:21:38 +0000 |
commit | a5b9f6c3a89fb71d809c5d369d54b80afe12e012 (patch) | |
tree | 7b6ebfb848dca6fc2200c385f5262b7ca7dbdc8a /obnamlib/plugins/forget_plugin.py | |
parent | 1318feaab8f90b96c251419eb6d5ec404433f200 (diff) | |
download | obnam-a5b9f6c3a89fb71d809c5d369d54b80afe12e012.tar.gz |
add some memory profiling to some operations
Diffstat (limited to 'obnamlib/plugins/forget_plugin.py')
-rw-r--r-- | obnamlib/plugins/forget_plugin.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/obnamlib/plugins/forget_plugin.py b/obnamlib/plugins/forget_plugin.py index 2faf1d3d..67067b46 100644 --- a/obnamlib/plugins/forget_plugin.py +++ b/obnamlib/plugins/forget_plugin.py @@ -39,10 +39,12 @@ class ForgetPlugin(obnamlib.ObnamPlugin): self.repo = self.app.open_repository() self.repo.lock_client(self.app.settings['client-name']) + self.app.dump_memory_profile('at beginning') if args: for genspec in args: genid = self.repo.genspec(genspec) self.remove(genid) + self.app.dump_memory_profile('after removing %s' % genid) elif self.app.settings['keep']: genlist = [] dt = datetime.datetime(1970, 1, 1, 0, 0, 0) @@ -58,8 +60,10 @@ class ForgetPlugin(obnamlib.ObnamPlugin): for genid, dt in genlist: if genid not in keepids: self.remove(genid) + self.app.dump_memory_profile('after removing %s' % genid) self.repo.commit_client() + self.app.dump_memory_profile('after committing') self.repo.fs.close() def remove(self, genid): |