From 9af37fbe73226ffa1917c4a24d2ad50b1db52c34 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 18 Dec 2011 12:17:28 +0000 Subject: benchmark fsck --- seivot | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/seivot b/seivot index a395597..6f53a9b 100755 --- a/seivot +++ b/seivot @@ -103,6 +103,9 @@ 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 list_files(self, nth_gen): '''This should retrieve a list of all files in a generation. @@ -208,6 +211,9 @@ 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 _genid(self, nth_gen): timings, out = self._run(['genids'], nth_gen, stdout=subprocess.PIPE) @@ -423,6 +429,7 @@ 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) for i in range(1, generations): self.generate_live_data(self.live_data, @@ -430,6 +437,7 @@ 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']) for i in range(generations): self.measure(prog.list_files, i, 0) -- cgit v1.2.1 From 36d972448f93cf62dbf02ec18e53ad3b8a77a4ee Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 18 Dec 2011 12:38:03 +0000 Subject: benchmark verify as well --- seivot | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/seivot b/seivot index 6f53a9b..f2097f5 100755 --- a/seivot +++ b/seivot @@ -106,6 +106,9 @@ class BackupProgram(object): 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. @@ -214,6 +217,9 @@ class Obnam(BackupProgram): 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) @@ -430,6 +436,7 @@ class Seivot(cliapp.Application): 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, @@ -438,6 +445,7 @@ class Seivot(cliapp.Application): 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) -- cgit v1.2.1 From 00f96d1c5773d251fa92c34a19c1afdfd13d059e Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 18 Dec 2011 12:38:20 +0000 Subject: update NEWS --- NEWS | 5 +++++ 1 file changed, 5 insertions(+) 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 --------------------------------- -- cgit v1.2.1 From 6597cbfa48f814981e2298b2d4691229a21784fc Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 18 Dec 2011 12:40:56 +0000 Subject: make seivots-summary report fsck and verify results --- seivots-summary | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/seivots-summary b/seivots-summary index ed0a404..f77109b 100755 --- a/seivots-summary +++ b/seivots-summary @@ -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 -- cgit v1.2.1 From b7ab92c014cfd833377ac14f99043bbf032a95ff Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 18 Dec 2011 12:42:28 +0000 Subject: indent tables four spaces for markdown --- seivots-summary | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/seivots-summary b/seivots-summary index f77109b..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] -- cgit v1.2.1