summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2011-12-18 12:42:43 +0000
committerLars Wirzenius <liw@liw.fi>2011-12-18 12:42:43 +0000
commitad701da511c24b7731c2f5f9498b2bd1fb17326a (patch)
treec86a5063870d346a4de95dd0f75064358ad6acd8
parent246d0247c2a37422600c739661ef82ce9efe5961 (diff)
parentb7ab92c014cfd833377ac14f99043bbf032a95ff (diff)
downloadseivot-ad701da511c24b7731c2f5f9498b2bd1fb17326a.tar.gz
benchmark fsck and verify
-rw-r--r--NEWS5
-rwxr-xr-xseivot16
-rwxr-xr-xseivots-summary16
3 files changed, 33 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 14e4045..4ff47cc 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,11 @@
NEWS for seivot, a backup benchmarking program
==============================================
+Version 1.15, released UNRELEASED
+---------------------------------
+
+* Benchmark fsck and verify operations.
+
Version 1.14, released 2011-09-17
---------------------------------
diff --git a/seivot b/seivot
index a395597..f2097f5 100755
--- a/seivot
+++ b/seivot
@@ -103,6 +103,12 @@ class BackupProgram(object):
most appropriate for the backup program.
'''
+
+ def fsck(self, nth_gen):
+ '''Run fsck on the repository, after the nth backup generation.'''
+
+ def verify(self, nth_gen):
+ '''Run verify on the repository, after the nth backup generation.'''
def list_files(self, nth_gen):
'''This should retrieve a list of all files in a generation.
@@ -208,6 +214,12 @@ class Obnam(BackupProgram):
def backup(self, nth_gen):
return self._run(['backup', self.live_data], nth_gen)[0]
+
+ def fsck(self, nth_gen):
+ return self._run(['fsck'], nth_gen)[0]
+
+ def verify(self, nth_gen):
+ return self._run(['verify', self.live_data], nth_gen)[0]
def _genid(self, nth_gen):
timings, out = self._run(['genids'], nth_gen, stdout=subprocess.PIPE)
@@ -423,6 +435,8 @@ class Seivot(cliapp.Application):
if self.settings['verify']:
self.summain(self.live_data, 'backup-0.summain')
self.measure(prog.backup, 0, amount)
+ self.measure(prog.fsck, 0, amount)
+ self.measure(prog.verify, 0, amount)
for i in range(1, generations):
self.generate_live_data(self.live_data,
@@ -430,6 +444,8 @@ class Seivot(cliapp.Application):
if self.settings['verify']:
self.summain(self.live_data, 'backup-%d.summain' % i)
self.measure(prog.backup, i, self.settings['incremental-data'])
+ self.measure(prog.fsck, i, self.settings['incremental-data'])
+ self.measure(prog.verify, i, self.settings['incremental-data'])
for i in range(generations):
self.measure(prog.list_files, i, 0)
diff --git a/seivots-summary b/seivots-summary
index ed0a404..7eca1ff 100755
--- a/seivots-summary
+++ b/seivots-summary
@@ -53,11 +53,11 @@ class Table(object):
widths = self.compute_column_widths(cells)
- f.write('%s\n' % self.format_headings(widths, 0))
- f.write('%s\n' % self.format_headings(widths, 1))
+ f.write(' %s\n' % self.format_headings(widths, 0))
+ f.write(' %s\n' % self.format_headings(widths, 1))
f.write('\n')
for row in self.rows:
- f.write('%s\n' % self.format_row(row, widths))
+ f.write(' %s\n' % self.format_row(row, widths))
def align_cell(self, width, text, column):
h1, h2, fmt, left = self.columns[column]
@@ -101,7 +101,9 @@ class SeivotsSummary(cliapp.Application):
for group, caption in self.find_groups(seivots):
title = 'Profile: %s' % caption
self.output.write('%s\n%s\n\n' % (title, '-' * len(title)))
- for op in ['backup', 'restore', 'list_files', 'forget']:
+ ops = ['backup', 'restore', 'list_files', 'forget', 'fsck',
+ 'verify']
+ for op in ops:
self.output.write('Operation: %s\n\n' % op)
table = self.make_table(group, op)
table.write_plaintext(self.output)
@@ -142,6 +144,12 @@ class SeivotsSummary(cliapp.Application):
'forget':
('gen0-time', 'gen0-ram', 'slowest-time', 'biggest-ram',
'repo-writes', 'repo-reads'),
+ 'fsck':
+ ('gen0-time', 'gen0-ram', 'slowest-time', 'biggest-ram',
+ 'repo-writes', 'repo-reads'),
+ 'verify':
+ ('gen0-time', 'gen0-speed', 'gen0-ram', 'slowest-time',
+ 'slowest-speed', 'biggest-ram','repo-writes', 'repo-reads'),
}
suffix = ('branch', 'description')
colnames = prefix + which[op] + suffix