Skip to content

Commit 39d89eb

Browse files
added skipReport key (#129)
1 parent 71faab4 commit 39d89eb

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/main/java/com/oltpbenchmark/DBWorkload.java

+8-5
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,9 @@ else if(analyze_on_all_tables) {
666666
Results r = runWorkload(benchList, intervalMonitor, workCount);
667667
writeOutputs(r, activeTXTypes, argsLine, xmlConfig,
668668
executeRules == null ? null : workloads.get(workCount - 1).getString("workload"),
669-
executeRules == null ? null : workloads.get(workCount - 1).getString("customTags", null));
669+
executeRules == null ? null : workloads.get(workCount - 1).getString("customTags", null),
670+
executeRules != null && workloads.get(workCount - 1).getBoolean("skipReport", false)
671+
);
670672
writeHistograms(r);
671673

672674
if (argsLine.hasOption("json-histograms")) {
@@ -696,12 +698,13 @@ else if (isBooleanOptionSet(argsLine, "execute")) {
696698
// if block currently only valid for bulkload experiments
697699
if(xmlConfig.containsKey("microbenchmark/properties/workload")) {
698700
writeOutputs(r, activeTXTypes, argsLine, xmlConfig,
699-
xmlConfig.getString("microbenchmark/properties/workload"), null);
701+
xmlConfig.getString("microbenchmark/properties/workload"), null,false);
700702
}
701703
else {
702704
writeOutputs(r, activeTXTypes, argsLine, xmlConfig,
703705
executeRules == null ? null : workloads.get(workCount - 1).getString("workload"),
704-
executeRules == null ? null : workloads.get(workCount - 1).getString("customTags", null));
706+
executeRules == null ? null : workloads.get(workCount - 1).getString("customTags", null),
707+
executeRules != null && workloads.get(workCount - 1).getBoolean("skipReport", false));
705708
}
706709
writeHistograms(r);
707710

@@ -833,7 +836,7 @@ private static String writeJSONHistograms(Results r) {
833836
*/
834837
private static void writeOutputs(Results r, List<TransactionType> activeTXTypes, CommandLine argsLine,
835838
XMLConfiguration xmlConfig, String workload_name,
836-
String customTags) throws Exception {
839+
String customTags,Boolean skipReport) throws Exception {
837840

838841
// If an output directory is used, store the information
839842
String outputDirectory = "results";
@@ -905,7 +908,7 @@ private static void writeOutputs(Results r, List<TransactionType> activeTXTypes,
905908
}
906909
if(workload_name == null || workload_name.isEmpty())
907910
workload_name = baseFileName;
908-
workloadToSummaryMap.put(workload_name, rw.writeDetailedSummary(ps, customTags));
911+
workloadToSummaryMap.put(workload_name, rw.writeDetailedSummary(ps, customTags, skipReport));
909912

910913
try {
911914
FileWriter writer = new FileWriter(filePathForOutputJson);

src/main/java/com/oltpbenchmark/util/ResultWriter.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ public void writeRaw(List<TransactionType> activeTXTypes, PrintStream out) {
227227
}
228228
}
229229

230-
public Map<String, Object> writeDetailedSummary(PrintStream os, String customTags) {
230+
public Map<String, Object> writeDetailedSummary(PrintStream os, String customTags, Boolean skipReport) {
231231
Map<String, Object> summaryMap = buildSummaryMap(dbType, collector, benchType, results);
232232
summaryMap.put("Transaction Distribution", transactionsMap(results));
233233
summaryMap.put("Help", help());
@@ -238,6 +238,7 @@ public Map<String, Object> writeDetailedSummary(PrintStream os, String customTag
238238
Map<String, Object> metadata = new TreeMap<>();
239239
metadata.put("yaml_version", expConf.getString("yaml_version", "v1.0"));
240240
metadata.put("customTags", formatCustomTags(customTags));
241+
metadata.put("skipReport",skipReport);
241242
detailedSummaryMap.put("metadata", metadata);
242243
detailedSummaryMap.put("Summary", summaryMap);
243244
detailedSummaryMap.put("queries", results.getFeaturebenchAdditionalResults().getJsonResultsList());

0 commit comments

Comments
 (0)