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
# build TSBS
RUN mkdir /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
......
......@@ -45,9 +45,9 @@ public class WorkloadApiServiceImpl extends WorkloadApiService {
//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_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 {
String generateDataCommand= "";
generateDataCommand = TSBSCommandBuilder.generateDataCommand(workload.getTsbsDataConfig());
String resultFileName =
//properties.getProperty(WorkloadApiProperties.WORKLOAD_RESULTS_FOLDER) +
TSBS_RESULT_FOLDER
//+ taskId + "-"
+ workload.getTsbsDataConfig().getFormat() + "-data.gz";
properties.getProperty(WorkloadApiProperties.WORKLOAD_RESULTS_FOLDER)
+ TSBS_RESULT_FOLDER
+ workload.getTsbsDataConfig().getFormat() + "-data.gz";
generateDataCommand += " | gzip > " + resultFileName;
ProcessBuilder genDataProcess= new ProcessBuilder();
......@@ -251,15 +250,15 @@ public class WorkloadApiServiceImpl extends WorkloadApiService {
}
System.out.println("finished data generation");
String fileToLoad = TSBS_RESULT_FOLDER /*+ taskId + "-"*/ + workload.getTsbsDataConfig().getFormat() + "-data.gz";
String queriesToExecute = TSBS_RESULT_FOLDER /*+ taskId + "-" + workload.getTsbsDataConfig().getFormat() + "-" + */ + workload.getTsbsQueryConfig().getQueryType() + ".gz";
String fileToLoad = properties.getProperty(WorkloadApiProperties.WORKLOAD_RESULTS_FOLDER) + TSBS_RESULT_FOLDER + workload.getTsbsDataConfig().getFormat() + "-data.gz";
String queriesToExecute = properties.getProperty(WorkloadApiProperties.WORKLOAD_RESULTS_FOLDER) + TSBS_RESULT_FOLDER + workload.getTsbsQueryConfig().getQueryType() + ".gz";
//Generate Queries
String generateQueriesCommand = "";
generateQueriesCommand = TSBSCommandBuilder.generateQueries(workload.getTsbsQueryConfig());
String resultQueriesName =
TSBS_RESULT_FOLDER
//+ taskId + "-"
properties.getProperty(WorkloadApiProperties.WORKLOAD_RESULTS_FOLDER)
+ TSBS_RESULT_FOLDER
+ workload.getTsbsQueryConfig().getQueryType() + ".gz";
generateQueriesCommand += "| gzip > " + resultQueriesName;
System.out.println(generateQueriesCommand);
......@@ -283,7 +282,7 @@ public class WorkloadApiServiceImpl extends WorkloadApiService {
// Benchmarking insert/write performance
String loadCommand = "";
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";
System.out.println(loadCommand);
ProcessBuilder loadProcess = new ProcessBuilder();
......@@ -306,7 +305,7 @@ public class WorkloadApiServiceImpl extends WorkloadApiService {
// Execute Queries
String exeQueries = "cat " + queriesToExecute + " | gunzip | ";
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);
workloadProcess
.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