Commit 88da5cb8 authored by Spiros Koulouzis's avatar Spiros Koulouzis

fix cast exception error

parent f98f2b58
...@@ -308,10 +308,10 @@ public class DeployService { ...@@ -308,10 +308,10 @@ public class DeployService {
Double executionTime = getExecutionTime(out[14]); Double executionTime = getExecutionTime(out[14]);
int totalNumberOfEvents = getTotalNumberOfEvents(out[15]); int totalNumberOfEvents = getTotalNumberOfEvents(out[15]);
long minExecutionTimePerRequest = getMinExecutionTimePerRequest(out[18]); double minExecutionTimePerRequest = getMinExecutionTimePerRequest(out[18]);
long avgExecutionTimePerRequest = getAvgExecutionTimePerRequest(out[19]); double avgExecutionTimePerRequest = getAvgExecutionTimePerRequest(out[19]);
long maxExecutionTimePerRequest = getMaxExecutionTimePerRequest(out[20]); double maxExecutionTimePerRequest = getMaxExecutionTimePerRequest(out[20]);
long approx95Percentile = getApprox95Percentile(out[21]); double approx95Percentile = getApprox95Percentile(out[21]);
double avgEventsPerThread = getAvgEventsPerThread(out[24]); double avgEventsPerThread = getAvgEventsPerThread(out[24]);
double stddevEventsPerThread = getStddevEventsPerThread(out[24]); double stddevEventsPerThread = getStddevEventsPerThread(out[24]);
...@@ -333,6 +333,7 @@ public class DeployService { ...@@ -333,6 +333,7 @@ public class DeployService {
b.setAvgExecTimePerThread(avgExecutionTimePerRequest); b.setAvgExecTimePerThread(avgExecutionTimePerRequest);
b.setMaxExecutionTimePerRequest(maxExecutionTimePerRequest); b.setMaxExecutionTimePerRequest(maxExecutionTimePerRequest);
b = (SysbenchCPUBenchmark) benchmarkResultService.save(b); b = (SysbenchCPUBenchmark) benchmarkResultService.save(b);
b.setAnsibleOutputID(ansOut.getId());
return b; return b;
default: default:
...@@ -376,20 +377,20 @@ public class DeployService { ...@@ -376,20 +377,20 @@ public class DeployService {
return Double.valueOf(string.replaceAll("execution time (avg/stddev):", "").replaceAll("s", "").trim().split("/")[0]); return Double.valueOf(string.replaceAll("execution time (avg/stddev):", "").replaceAll("s", "").trim().split("/")[0]);
} }
private long getMinExecutionTimePerRequest(String string) { private double getMinExecutionTimePerRequest(String string) {
return Long.valueOf(string.replaceAll("min:", "").replaceAll("ms", "").trim()); return Double.valueOf(string.replaceAll("min:", "").replaceAll("ms", "").trim());
} }
private long getAvgExecutionTimePerRequest(String string) { private double getAvgExecutionTimePerRequest(String string) {
return Long.valueOf(string.replaceAll("avg:", "").replaceAll("ms", "").trim()); return Double.valueOf(string.replaceAll("avg:", "").replaceAll("ms", "").trim());
} }
private long getMaxExecutionTimePerRequest(String string) { private double getMaxExecutionTimePerRequest(String string) {
return Long.valueOf(string.replaceAll("max:", "").replaceAll("ms", "").trim()); return Double.valueOf(string.replaceAll("max:", "").replaceAll("ms", "").trim());
} }
private long getApprox95Percentile(String string) { private double getApprox95Percentile(String string) {
return Long.valueOf(string.replaceAll("approx. 95 percentile::", "").replaceAll("ms", "").trim()); return Double.valueOf(string.replaceAll("approx. 95 percentile::", "").replaceAll("ms", "").trim());
} }
} }
...@@ -38,6 +38,7 @@ public class SysbenchCPUBenchmark extends BenchmarkResult { ...@@ -38,6 +38,7 @@ public class SysbenchCPUBenchmark extends BenchmarkResult {
private double avgExecutionTimePerRequest; private double avgExecutionTimePerRequest;
private double maxExecutionTimePerRequest; private double maxExecutionTimePerRequest;
private double approx95Percentile; private double approx95Percentile;
private String ansibleOutputID;
/** /**
* @return the sysbenchVersion * @return the sysbenchVersion
...@@ -207,4 +208,15 @@ public class SysbenchCPUBenchmark extends BenchmarkResult { ...@@ -207,4 +208,15 @@ public class SysbenchCPUBenchmark extends BenchmarkResult {
this.approx95Percentile = approx95Percentile; this.approx95Percentile = approx95Percentile;
} }
public void setAnsibleOutputID(String ansibleOutputID) {
this.ansibleOutputID = ansibleOutputID;
}
/**
* @return the ansibleOutputID
*/
public String getAnsibleOutputID() {
return ansibleOutputID;
}
} }
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