Commit f98f2b58 authored by Spiros Koulouzis's avatar Spiros Koulouzis

move save to parse

parent aeb05b06
...@@ -282,8 +282,9 @@ public class DeployService { ...@@ -282,8 +282,9 @@ public class DeployService {
ansOut.setCloudDeploymentDomain(domain); ansOut.setCloudDeploymentDomain(domain);
ansOut.setProvisionID(deployInfo.getProvisionID()); ansOut.setProvisionID(deployInfo.getProvisionID());
ansOut = ansibleOutputService.save(ansOut); ansOut = ansibleOutputService.save(ansOut);
BenchmarkResult benchmarkResult = parseToBenchmarkResult(ansOut); BenchmarkResult benchmarkResult = parseSaveBenchmarkResult(ansOut);
benchmarkResultService.save(benchmarkResult);
outputListIds.add(ansOut.getId()); outputListIds.add(ansOut.getId());
} }
...@@ -293,7 +294,7 @@ public class DeployService { ...@@ -293,7 +294,7 @@ public class DeployService {
return deployResponse; return deployResponse;
} }
private BenchmarkResult parseToBenchmarkResult(AnsibleOutput ansOut) { private BenchmarkResult parseSaveBenchmarkResult(AnsibleOutput ansOut) {
AnsibleResult res = ansOut.getAnsibleResult(); AnsibleResult res = ansOut.getAnsibleResult();
if (res != null) { if (res != null) {
List<String> cmdList = res.getCmd(); List<String> cmdList = res.getCmd();
...@@ -331,6 +332,7 @@ public class DeployService { ...@@ -331,6 +332,7 @@ public class DeployService {
b.setMinExecutionTimePerRequest(minExecutionTimePerRequest); b.setMinExecutionTimePerRequest(minExecutionTimePerRequest);
b.setAvgExecTimePerThread(avgExecutionTimePerRequest); b.setAvgExecTimePerThread(avgExecutionTimePerRequest);
b.setMaxExecutionTimePerRequest(maxExecutionTimePerRequest); b.setMaxExecutionTimePerRequest(maxExecutionTimePerRequest);
b = (SysbenchCPUBenchmark) benchmarkResultService.save(b);
return b; return b;
default: default:
......
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