Commit 9332a3a5 authored by Julien Muchembled's avatar Julien Muchembled

Do not leave SQLite DB files at the end of perf tests if no error happened

parent 20dae799
......@@ -108,9 +108,11 @@ class MatrixImportBenchmark(BenchmarkRunner):
self._size = size
else:
assert self._size == size
return end - start
finally:
neo.stop()
# Clear DB if no error happened.
neo.setupDB()
return end - start
except:
traceback.print_exc()
self.error_log += "Import with m=%s, s=%s, r=%s, p=%s:" % (
......
......@@ -47,18 +47,18 @@ class ImportBenchmark(BenchmarkRunner):
master_count=config.masters,
verbose=False,
)
# import datafs
neo.start()
try:
neo.start()
try:
return self.buildReport(*self.runImport(neo))
except:
summary = 'Perf : import failed'
report = ''.join(traceback.format_exc())
return summary, report
finally:
neo.stop()
result = self.buildReport(*self.runImport(neo))
finally:
neo.stop()
# Clear DB if no error happened.
neo.setupDB()
return result
except:
return 'Perf: import failed', ''.join(traceback.format_exc())
def runImport(self, neo):
......
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