Commit 5f70c879 authored by Daniel Seybold's avatar Daniel Seybold

updated availability phases plotting

parent c2741fef
Pipeline #53692 passed with stage
in 15 minutes and 1 second
This diff is collapsed.
......@@ -147,6 +147,8 @@ public class AvailabilityYCSBWriteScenario extends EvaluationScenario {
Plotting workloadTimeseries = new Plotting(this.evaluationContext, this.dbmsClusterContext, PlottingTask.WORKLOAD_METRICS, availabilityYCSBWrite
.getWorkloadInstances());
Plotting availabilityPhases = new Plotting(this.evaluationContext, this.dbmsClusterContext, PlottingTask.AVAILABILITY_PHASES, "load");
/**
* Increase the run counter
......@@ -174,12 +176,6 @@ public class AvailabilityYCSBWriteScenario extends EvaluationScenario {
.execute(new LogTask(evaluationContext, TaskType.YCSB_LOAD, TaskState.FINISHED))
.build(),
aNewSequentialFlow()
//.execute(gibbonDelay)
//.execute(new LogTask(evaluationContext, TaskType.GIBBON, TaskState.STARTED))
//.execute(gibbon)
//.execute(new LogTask(evaluationContext, TaskType.GIBBON, TaskState.FINISHED))
//.execute(recoveryDelay)
//.execute(recovery)
.execute(gibbonV2)
.build())
.build()
......@@ -189,6 +185,7 @@ public class AvailabilityYCSBWriteScenario extends EvaluationScenario {
.execute(evaluationTimeseries)
.execute(workloadTimeseries)
.execute(systemTimeseries)
.execute(availabilityPhases)
.execute(new LogTask(evaluationContext, TaskType.CLEANUP, TaskState.STARTED))
.execute(cleanUpResources)
.execute(new LogTask(evaluationContext, TaskType.CLEANUP, TaskState.FINISHED))
......
......@@ -27,7 +27,7 @@ public class Plotting extends EvaluationTask {
private PlottingTask plottingTask;
private List<String> workloadInstances;
private int scalingDelay;
private int gibbonDelay;
private String workloadPhase;
public enum PlottingTask{
SYSTEM_METRICS,
......@@ -38,8 +38,7 @@ public class Plotting extends EvaluationTask {
MERGE_YCSB_TRANSACTION,
MERGE_YCSB_ALL,
ELASTICITY_PHASES,
AVAILABILITY_PHASES,
AVAILABILITY_PHASES_RECOVERY
AVAILABILITY_PHASES
}
......@@ -52,8 +51,6 @@ public class Plotting extends EvaluationTask {
public Plotting(EvaluationContext evaluationContext, ClusterContext clusterContext, PlottingTask plottingTask) {
super(TaskType.PLOTTING, evaluationContext);
this.clusterContext = clusterContext;
this.plottingTask = plottingTask;
}
......@@ -95,19 +92,18 @@ public class Plotting extends EvaluationTask {
* @param evaluationContext
* @param clusterContext
* @param plottingTask
* @param gibbonDelay
* @param scalingDelay
* @param workloadPhase
*/
public Plotting(EvaluationContext evaluationContext, ClusterContext clusterContext, PlottingTask plottingTask, int gibbonDelay, int scalingDelay) {
public Plotting(EvaluationContext evaluationContext, ClusterContext clusterContext, PlottingTask plottingTask, String workloadPhase) {
super(TaskType.PLOTTING, evaluationContext);
this.gibbonDelay = gibbonDelay;
this.scalingDelay = scalingDelay;
this.workloadPhase = workloadPhase;
this.clusterContext = clusterContext;
this.plottingTask = plottingTask;
}
@Override
public WorkReport call() {
......@@ -153,13 +149,10 @@ public class Plotting extends EvaluationTask {
break;
case AVAILABILITY_PHASES:
LOGGER.debug(loggerPrefix + "plotting availability phases of YCSB results...");
this.plotAvailabilityPhases(this.gibbonDelay);
break;
case AVAILABILITY_PHASES_RECOVERY:
LOGGER.debug(loggerPrefix + "plotting availability phases with recovery of YCSB results...");
this.plotElasticityPhases(this.scalingDelay);
this.plotAvailabilityPhases(this.workloadPhase);
break;
}
return new DefaultWorkReport(WorkStatus.COMPLETED);
......@@ -453,7 +446,7 @@ public class Plotting extends EvaluationTask {
}
private void plotAvailabilityPhases(int gibbonDelay){
private void plotAvailabilityPhases(String workloadPhase){
LOGGER.debug(this.loggerPrefix + "plotting availability phases!");
String plottingScript = this.properties.get(EntrypointProperties.PLOTTING_SCRIPT_DIR) + File.separator + "timeseries" + File.separator + "plotEvaluationPhases.py";
......@@ -467,8 +460,9 @@ public class Plotting extends EvaluationTask {
resultFolder,
"-s",
"availability",
"-gd",
String.valueOf(gibbonDelay)
"-wp",
workloadPhase
);
LOGGER.debug(this.loggerPrefix + "Calling availability phase plotting script: " + plotAvailabilityPhases.command().toString());
......@@ -489,43 +483,5 @@ public class Plotting extends EvaluationTask {
}
private void plotAvailabilityRecoveryPhases(int gibbonDelay, int scaleDelay){
LOGGER.debug(this.loggerPrefix + "plotting availability with recovery phases!");
String plottingScript = this.properties.get(EntrypointProperties.PLOTTING_SCRIPT_DIR) + File.separator + "timeseries" + File.separator + "plotEvaluationPhases.py";
String resultFolder = this.evaluationContext.getEvluationRun() + File.separator;
ProcessBuilder plotAvailabilityPhases = new ProcessBuilder(
"python3",
plottingScript,
"-rf",
resultFolder,
"-s",
"availability",
"-gd",
String.valueOf(gibbonDelay),
"-rd",
String.valueOf(scaleDelay),
"-ra"
);
LOGGER.debug(this.loggerPrefix + "Calling availability with recovery phase plotting script: " + plotAvailabilityPhases.command().toString());
try {
File plotAvailabilityPhasesOutput = new File(resultFolder + File.separator + "timeseries" + File.separator + "availabilityPhases.log");
plotAvailabilityPhases.redirectErrorStream(true);
plotAvailabilityPhases.redirectOutput(Redirect.appendTo(plotAvailabilityPhasesOutput));
plotAvailabilityPhases.start();
} catch (IOException e) {
LOGGER.error(this.loggerPrefix + "Error while plotting availability with recovery phases!",e);
}
}
}
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