summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@xander>2010-12-26 16:27:00 +0200
committerLars Wirzenius <liw@xander>2010-12-26 16:27:00 +0200
commit8ca2e7d0b0947fe5ad1f8029424a4605e1c71b63 (patch)
treeeab8a22494952d93a1d014c4bf062d611d40b900
parentbe9c9857024a30d16ff908934928beb529553743 (diff)
downloadobnam-8ca2e7d0b0947fe5ad1f8029424a4605e1c71b63.tar.gz
Add message describing dump context.
-rw-r--r--obnamlib/plugins/backup_plugin.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/obnamlib/plugins/backup_plugin.py b/obnamlib/plugins/backup_plugin.py
index cdce03d8..db3f21b1 100644
--- a/obnamlib/plugins/backup_plugin.py
+++ b/obnamlib/plugins/backup_plugin.py
@@ -119,7 +119,7 @@ class BackupPlugin(obnamlib.ObnamPlugin):
self.store.lock_client(client_name)
self.store.start_generation()
last_checkpoint = storefs.bytes_written
- self.dump_memory_profile()
+ self.dump_memory_profile('at end of checkpoint')
self.backup_parents('.')
@@ -130,7 +130,7 @@ class BackupPlugin(obnamlib.ObnamPlugin):
storefs.close()
logging.info('Backup finished.')
- self.dump_memory_profile()
+ self.dump_memory_profile('at end of backup run')
def vmrss(self):
f = open('/proc/self/status')
@@ -141,8 +141,9 @@ class BackupPlugin(obnamlib.ObnamPlugin):
f.close()
return rss
- def dump_memory_profile(self):
+ def dump_memory_profile(self, msg):
import gc
+ logging.debug('dumping memory profiling data: %s' % msg)
logging.debug('VmRSS: %s KiB' % self.vmrss())
logging.debug('# objects: %d' % len(gc.get_objects()))
logging.debug('# garbage: %d' % len(gc.garbage))