diff options
author | Lars Wirzenius <liw@xander> | 2010-12-18 00:41:23 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@xander> | 2010-12-18 00:41:23 +0200 |
commit | e1edb3edcead3886cf4f456d522d154faa2b20a6 (patch) | |
tree | d717d0bdd09e1ed491515f2c0ee18f53eb57f194 | |
parent | f99478d6ba4152a2d9e61d8ce51d0a4b155f3587 (diff) | |
download | obnam-e1edb3edcead3886cf4f456d522d154faa2b20a6.tar.gz |
Implement memory profile dumping using heapy.
-rw-r--r-- | obnamlib/plugins/backup_plugin.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/obnamlib/plugins/backup_plugin.py b/obnamlib/plugins/backup_plugin.py index bb7f6c1d..99447249 100644 --- a/obnamlib/plugins/backup_plugin.py +++ b/obnamlib/plugins/backup_plugin.py @@ -115,8 +115,7 @@ class BackupPlugin(obnamlib.ObnamPlugin): self.store.lock_client(client_name) self.store.start_generation() last_checkpoint = storefs.bytes_written - if self.app.config['dump-meliae']: - self.dump_memory_profile() + self.dump_memory_profile() self.backup_parents('.') @@ -130,7 +129,10 @@ class BackupPlugin(obnamlib.ObnamPlugin): self.dump_memory_profile() def dump_memory_profile(self): - pass + if self.app.config['dump-memory-profile']: + from guppy import hpy + h = hpy() + logging.debug('memory profile:\n%s' % h.heap()) def find_files(self, root): '''Find all files and directories that need to be backed up. |