mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-01-11 08:22:04 -06:00
provide JSON friendly optimo result
This commit is contained in:
parent
f22a04622f
commit
35abcc03a9
@ -31,6 +31,19 @@ public class MVResult {
|
||||
return result;
|
||||
}
|
||||
|
||||
public Map<String,Map<String,Double>> getMap() {
|
||||
Map<String,Map<String,Double>> map = new HashMap<>();
|
||||
for (int i = 0; i < params.size(); i++) {
|
||||
Map<String,Double> entry = Map.of(
|
||||
"min", params.get(i).min,
|
||||
"max", params.get(i).max,
|
||||
"value", this.vars[i]
|
||||
);
|
||||
map.put(params.get(i).name, entry);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
int pos = 0;
|
||||
|
@ -285,9 +285,7 @@ function optimo() {
|
||||
latency_ms: results_array[results_array.length - 1].latency_ms,
|
||||
ops_per_second: results_array[results_array.length - 1].ops_per_second,
|
||||
total_seconds: total_seconds,
|
||||
vars: result.vars,
|
||||
params: result.params,
|
||||
log: result.datalog
|
||||
result: result.map
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user