Commit cf1ca70c authored by Daniel Seybold's avatar Daniel Seybold

enabled pretty print for specs printing via gson

parent 03c35c2e
Pipeline #51868 passed with stage
in 12 minutes and 18 seconds
package de.uulm.omi.evaluation.task;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import de.uulm.omi.cloudiator.dbms.evaluator.model.EvaluationContext;
import de.uulm.omi.utils.EntrypointProperties;
import java.io.IOException;
......@@ -41,7 +42,7 @@ public abstract class EvaluationTask implements Work, ReportService {
public static final String TIMESERIES_FOLDER = "timeseries";
public static final String TASK_LOG_FOLDER = "taskLogs";
public static final Gson GSON = new Gson();
public static final Gson GSON = new GsonBuilder().setPrettyPrinting().create();
protected final EvaluationContext evaluationContext;
protected final TaskType taskType;
......
......@@ -156,13 +156,11 @@ public class YcsbWorkload extends EvaluationTask {
private void writeWorkloadSpec(int instanceCounter, String workloadSpecName){
String ycsbJSON = GSON.toJson(ycsbWorkload);
//Write Spec to disk
LOGGER.debug(loggerPrefix + "Running Workload Spec: " + ycsbJSON);
LOGGER.debug(loggerPrefix + "Running Workload Spec: " + ycsbWorkload.toString());
String specUri = this.evaluationContext.getEvluationRun() + File.separator + EvaluationTask.SPECS_FOLDER
+ File.separator + instanceCounter + "_" + workloadSpecName;
this.writeReport(specUri, ycsbJSON);
this.writeReport(specUri, GSON.toJson(ycsbWorkload));
}
......
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