diff options
author | Lars Wirzenius <liw@liw.fi> | 2011-06-25 15:08:35 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2011-06-25 15:08:35 +0100 |
commit | 1244c103dca6d4240d9b7c72aad109ec70eaace5 (patch) | |
tree | 032baffcf9d233bb5784eb6f746fdcaf7d4798fe /seivot | |
parent | e58f82ed1b2d2781c8b764c037994981ae833c76 (diff) | |
download | seivot-1244c103dca6d4240d9b7c72aad109ec70eaace5.tar.gz |
Don't run viewprof on profiling files, but keep the original files.
Diffstat (limited to 'seivot')
-rwxr-xr-x | seivot | 19 |
1 files changed, 5 insertions, 14 deletions
@@ -159,25 +159,16 @@ class Obnam(BackupProgram): '--weak-random'] env = dict(os.environ) if self.settings['obnam-profile']: - fd, env['OBNAM_PROFILE'] = tempfile.mkstemp() - os.close(fd) + namepattern = { + 'gen': str(nth_gen), + 'op': args[0], + } + env['OBNAM_PROFILE'] = self.settings['obnam-profile'] % namepattern if self._larch_branch: env['PYTHONPATH'] = self._larch_branch if self.settings['encrypt-with']: cmd += ['--encrypt-with', self.settings['encrypt-with']] result = runcmd(cmd + args, cwd=self._branch, env=env, **kwargs) - if self.settings['obnam-profile']: - namepattern = { - 'gen': str(nth_gen), - 'op': args[0], - } - for order in ['cumulative', 'time']: - namepattern['order'] = order - name = self.settings['obnam-profile'] % namepattern - f = open(name, 'w') - runcmd(['viewprof', env['OBNAM_PROFILE'], order], stdout=f) - f.close() - os.remove(env['OBNAM_PROFILE']) self.extract_repository_io(result[0], logfile) |