Commit 32a22954 authored by Daniel Seybold's avatar Daniel Seybold

changed TSBS repo to fork on GitLab to fix Cassandra connection issue, minro...

changed TSBS repo to fork on GitLab to fix Cassandra connection issue, minro refactoring for TSBS result folder
parent f4a19e8b
...@@ -64,8 +64,14 @@ RUN apt-get install golang-go -y ...@@ -64,8 +64,14 @@ RUN apt-get install golang-go -y
# build TSBS # build TSBS
RUN mkdir /opt/workloads/tsbs/ RUN mkdir /opt/workloads/tsbs/
ENV GOPATH /opt/workloads/tsbs/ ENV GOPATH /opt/workloads/tsbs/
RUN go get github.com/timescale/tsbs || true
RUN cd /opt/workloads/tsbs/src/github.com/timescale/tsbs/cmd && go get ./... #Do not use orginal TSBS as there is an issue with the Cassandra connection
#RUN go get github.com/timescale/tsbs || true
#RUN cd /opt/workloads/tsbs/src/github.com/timescale/tsbs/cmd && go get ./...
#Use fork on GitLab with fixed Cassandra connection
RUN go get omi-gitlab.e-technik.uni-ulm.de/mowgli/benchmarks/mowgli-tsbs || true
RUN cd /opt/workloads/tsbs/src/omi-gitlab.e-technik.uni-ulm.de/mowgli/benchmarks/mowgli-tsbs/cmd && go get ./...
# telegraf monitoring # telegraf monitoring
......
...@@ -45,9 +45,9 @@ public class WorkloadApiServiceImpl extends WorkloadApiService { ...@@ -45,9 +45,9 @@ public class WorkloadApiServiceImpl extends WorkloadApiService {
//TSBS constants //TSBS constants
private final String TSBS_RESULT_FOLDER = "/tmp/"; // TODO CHANGE private final String TSBS_RESULT_FOLDER = "TSBS/";
private static final String TSBS_BINARY = "/opt/workloads/tsbs/bin/"; private static final String TSBS_BINARY = "/opt/workloads/tsbs/bin/";
private static final String TSBS_SCRIPTS = "/opt/workloads/tsbs/src/github.com/timescale/tsbs/scripts/"; private static final String TSBS_SCRIPTS = "/opt/workloads/tsbs/src/omi-gitlab.e-technik.uni-ulm.de/mowgli/benchmarks/mowgli-tsbs/scripts/";
...@@ -227,10 +227,9 @@ public class WorkloadApiServiceImpl extends WorkloadApiService { ...@@ -227,10 +227,9 @@ public class WorkloadApiServiceImpl extends WorkloadApiService {
String generateDataCommand= ""; String generateDataCommand= "";
generateDataCommand = TSBSCommandBuilder.generateDataCommand(workload.getTsbsDataConfig()); generateDataCommand = TSBSCommandBuilder.generateDataCommand(workload.getTsbsDataConfig());
String resultFileName = String resultFileName =
//properties.getProperty(WorkloadApiProperties.WORKLOAD_RESULTS_FOLDER) + properties.getProperty(WorkloadApiProperties.WORKLOAD_RESULTS_FOLDER)
TSBS_RESULT_FOLDER + TSBS_RESULT_FOLDER
//+ taskId + "-" + workload.getTsbsDataConfig().getFormat() + "-data.gz";
+ workload.getTsbsDataConfig().getFormat() + "-data.gz";
generateDataCommand += " | gzip > " + resultFileName; generateDataCommand += " | gzip > " + resultFileName;
ProcessBuilder genDataProcess= new ProcessBuilder(); ProcessBuilder genDataProcess= new ProcessBuilder();
...@@ -251,15 +250,15 @@ public class WorkloadApiServiceImpl extends WorkloadApiService { ...@@ -251,15 +250,15 @@ public class WorkloadApiServiceImpl extends WorkloadApiService {
} }
System.out.println("finished data generation"); System.out.println("finished data generation");
String fileToLoad = TSBS_RESULT_FOLDER /*+ taskId + "-"*/ + workload.getTsbsDataConfig().getFormat() + "-data.gz"; String fileToLoad = properties.getProperty(WorkloadApiProperties.WORKLOAD_RESULTS_FOLDER) + TSBS_RESULT_FOLDER + workload.getTsbsDataConfig().getFormat() + "-data.gz";
String queriesToExecute = TSBS_RESULT_FOLDER /*+ taskId + "-" + workload.getTsbsDataConfig().getFormat() + "-" + */ + workload.getTsbsQueryConfig().getQueryType() + ".gz"; String queriesToExecute = properties.getProperty(WorkloadApiProperties.WORKLOAD_RESULTS_FOLDER) + TSBS_RESULT_FOLDER + workload.getTsbsQueryConfig().getQueryType() + ".gz";
//Generate Queries //Generate Queries
String generateQueriesCommand = ""; String generateQueriesCommand = "";
generateQueriesCommand = TSBSCommandBuilder.generateQueries(workload.getTsbsQueryConfig()); generateQueriesCommand = TSBSCommandBuilder.generateQueries(workload.getTsbsQueryConfig());
String resultQueriesName = String resultQueriesName =
TSBS_RESULT_FOLDER properties.getProperty(WorkloadApiProperties.WORKLOAD_RESULTS_FOLDER)
//+ taskId + "-" + TSBS_RESULT_FOLDER
+ workload.getTsbsQueryConfig().getQueryType() + ".gz"; + workload.getTsbsQueryConfig().getQueryType() + ".gz";
generateQueriesCommand += "| gzip > " + resultQueriesName; generateQueriesCommand += "| gzip > " + resultQueriesName;
System.out.println(generateQueriesCommand); System.out.println(generateQueriesCommand);
...@@ -283,7 +282,7 @@ public class WorkloadApiServiceImpl extends WorkloadApiService { ...@@ -283,7 +282,7 @@ public class WorkloadApiServiceImpl extends WorkloadApiService {
// Benchmarking insert/write performance // Benchmarking insert/write performance
String loadCommand = ""; String loadCommand = "";
loadCommand = TSBSCommandBuilder.measurePerformance(workload.getTsbsDataConfig(), workload.getTsbsLoadConfig(), TSBS_RESULT_FOLDER, TSBS_SCRIPTS); loadCommand = TSBSCommandBuilder.measurePerformance(workload.getTsbsDataConfig(), workload.getTsbsLoadConfig(), TSBS_RESULT_FOLDER, TSBS_SCRIPTS);
loadCommand += " > " + TSBS_RESULT_FOLDER //+ taskId + "_" loadCommand += " > " + properties.getProperty(WorkloadApiProperties.WORKLOAD_RESULTS_FOLDER) + TSBS_RESULT_FOLDER
+ "load_metrics.csv"; + "load_metrics.csv";
System.out.println(loadCommand); System.out.println(loadCommand);
ProcessBuilder loadProcess = new ProcessBuilder(); ProcessBuilder loadProcess = new ProcessBuilder();
...@@ -306,7 +305,7 @@ public class WorkloadApiServiceImpl extends WorkloadApiService { ...@@ -306,7 +305,7 @@ public class WorkloadApiServiceImpl extends WorkloadApiService {
// Execute Queries // Execute Queries
String exeQueries = "cat " + queriesToExecute + " | gunzip | "; String exeQueries = "cat " + queriesToExecute + " | gunzip | ";
exeQueries += TSBSCommandBuilder.executeQueries(workload.getTsbsDataConfig(), workload.getTsbsQueryExecution()/*, queriesToExecute*/); exeQueries += TSBSCommandBuilder.executeQueries(workload.getTsbsDataConfig(), workload.getTsbsQueryExecution()/*, queriesToExecute*/);
exeQueries += " > " + TSBS_RESULT_FOLDER + "query_execution.csv"; exeQueries += " > " + properties.getProperty(WorkloadApiProperties.WORKLOAD_RESULTS_FOLDER) + TSBS_RESULT_FOLDER + "query_execution.csv";
System.out.println(exeQueries); System.out.println(exeQueries);
workloadProcess workloadProcess
.startWorkload(TSBS_BINARY, UNIX_SHELL, UNIX_COMMAND_PARAM, exeQueries, taskId, .startWorkload(TSBS_BINARY, UNIX_SHELL, UNIX_COMMAND_PARAM, exeQueries, taskId,
......
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