mirror of https://gitee.com/bigwinds/arangodb
Rearange the outputs of our tests so it matches the structure required by the unittest framework
This commit is contained in:
parent
44d87e1ba5
commit
5b4209d95e
|
@ -133,16 +133,13 @@ var loadTestRunner = function (tests, options, testMethods) {
|
|||
if (typeof(test.func) === "function") {
|
||||
var resultSet;
|
||||
resultSet = measure(test, options);
|
||||
results[test.name] = resultSet;
|
||||
results[test.name].status = true;
|
||||
|
||||
var oneResult;
|
||||
|
||||
for (oneResult in resultSet) {
|
||||
if (resultSet.hasOwnProperty(oneResult) && (oneResult !== 'status')) {
|
||||
results[test.name + '/' + oneResult] = {status: true};
|
||||
var stats = calc(resultSet[oneResult], options);
|
||||
results[test.name][oneResult][0].calced = stats;
|
||||
results[test.name][oneResult].status = true;
|
||||
|
||||
for (j = 0; j < measurements.length;j ++) {
|
||||
if (stats.hasOwnProperty(measurements[j])) {
|
||||
|
@ -162,12 +159,21 @@ var loadTestRunner = function (tests, options, testMethods) {
|
|||
pad(stats[measurements[j]].avg.toFixed(options.digits), cellLength, "left") + sep +
|
||||
pad(stats[measurements[j]].har.toFixed(options.digits), cellLength, "left") + sep +
|
||||
pad(stats[measurements[j]].rat.toFixed(2), runsLength, "left") + sep + measurements[j]);
|
||||
for (var calculation in stats[measurements[j]]) {
|
||||
results[test.name + '/' + oneResult][measurements[j] + '/' + calculation] = {
|
||||
status: true,
|
||||
message: '',
|
||||
duration: stats[measurements[j]][calculation]
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print(new Array(lineLength).join("-"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
for (i = 0; i < tests.length; ++i) {
|
||||
|
|
Loading…
Reference in New Issue