Commit 268cd68c authored by Grégory Wisniewski's avatar Grégory Wisniewski

Include traceback of failed imports in matrix benchmark.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2445 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 93aeff70
...@@ -17,6 +17,8 @@ MAX_REPLICAS = 1 ...@@ -17,6 +17,8 @@ MAX_REPLICAS = 1
class MatrixImportBenchmark(BenchmarkRunner): class MatrixImportBenchmark(BenchmarkRunner):
error_log = ''
def add_options(self, parser): def add_options(self, parser):
parser.add_option('-d', '--datafs') parser.add_option('-d', '--datafs')
parser.add_option('', '--min-storages') parser.add_option('', '--min-storages')
...@@ -85,6 +87,9 @@ class MatrixImportBenchmark(BenchmarkRunner): ...@@ -85,6 +87,9 @@ class MatrixImportBenchmark(BenchmarkRunner):
return time() - start return time() - start
except: except:
traceback.print_exc() traceback.print_exc()
self.error_log += "Import with m=%s, s=%s, r=%s, p=%s:" % (
masters, storages, replicas, partitions)
self.error_log += "\n%s\n" % ''.join(traceback.format_stack())
return None return None
finally: finally:
neo.stop() neo.stop()
...@@ -118,6 +123,7 @@ class MatrixImportBenchmark(BenchmarkRunner): ...@@ -118,6 +123,7 @@ class MatrixImportBenchmark(BenchmarkRunner):
values.append('N/A') values.append('N/A')
report += fmt % (tuple([s] + values)) report += fmt % (tuple([s] + values))
report += sep report += sep
report += self.error_log
if failures: if failures:
info = '%d failures' % (failures, ) info = '%d failures' % (failures, )
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment