Commit e8abb19b authored by Grégory Wisniewski's avatar Grégory Wisniewski

Handle properly failures in matrix runner.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1769 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 634f2775
......@@ -4,6 +4,7 @@ import sys
import os
import math
import optparse
import traceback
from time import time
from neo.tests.functional import NEOCluster
......@@ -35,7 +36,8 @@ def run(masters, storages, replicas, partitions, datafs, verbose):
neo_storage.copyTransactionsFrom(dfs_storage)
return time() - start
except:
return -1
traceback.print_exc()
return None
finally:
neo.stop()
......@@ -45,8 +47,10 @@ def runMatrix(datafs, storages, replicas, verbose):
for s in storages:
for r in [r for r in replicas if r < s]:
stats.setdefault(s, {})
speed = size / run(1, s, r, 100, datafs, verbose)
stats[s][r] = speed / 1024
result = run(1, s, r, 100, datafs, verbose)
if result is not None:
result = size / result / 1024
stats[s][r] = result
return stats
def buildArray(storages, replicas, results):
......@@ -61,6 +65,9 @@ def buildArray(storages, replicas, results):
assert s in results
for r in replicas:
if r in results[s]:
if results[s][r] is None:
values.append('FAIL')
else:
values.append('%8.1f' % results[s][r])
else:
values.append('N/A')
......
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