From 5896c096795603bdb8e3648dfc5725663e9ddea7 Mon Sep 17 00:00:00 2001 From: Johannes Mey <johannes.mey@tu-dresden.de> Date: Sun, 17 Mar 2019 21:23:49 +0100 Subject: [PATCH] started work on plots --- .../trainbenchmark-reporting/individual.R | 73 ++++++++++--------- .../trainbenchmark-reporting/install.R | 2 +- .../merge_results.json | 13 +++- .../trainbenchmark-reporting/merge_results.py | 2 +- .../trainbenchmark-reporting/tool-list.csv | 11 ++- .../trainbenchmark-reporting/tools.csv | 36 +++------ .../trainbenchmark-reporting/toolwise.sh | 2 +- .../src/main/resources/basic-settings.json | 7 +- ...anualRelastIncrementalBenchmarkConfig.java | 2 +- .../config/ManualRelastBenchmarkConfig.java | 2 +- 10 files changed, 69 insertions(+), 81 deletions(-) diff --git a/trainbenchmark/trainbenchmark-reporting/individual.R b/trainbenchmark/trainbenchmark-reporting/individual.R index 4aaad0d9e..d2b919453 100644 --- a/trainbenchmark/trainbenchmark-reporting/individual.R +++ b/trainbenchmark/trainbenchmark-reporting/individual.R @@ -7,18 +7,19 @@ library(arules) library(ggforce) library(extrafont) -# loadfonts(device="postscript") +loadfonts(device="postscript") loadfonts(quiet=TRUE) source('util.R') # constants workloads = c( - # "PosLength", "SwitchMonitored", + "PosLength", + "SwitchMonitored", "RouteSensor", - # "SwitchSet", - "ConnectedSegments" - # "SemaphoreNeighbor" + "SwitchSet", + "ConnectedSegments", + "SemaphoreNeighbor" ) phases = c("Read", "Check", "Read.and.Check", "Transformation", "Recheck", "Transformation.and.Recheck") phasesPrettified = c("Read", "Check", "Read and Check", "Transformation", "Recheck", "Transformation and Recheck") @@ -26,10 +27,10 @@ phasesPrettified = c("Read", "Check", "Read and Check", "Transformation", "Reche sizes = list() # 1 2 4 8 16 32 64 128 256 512 1024 2048 4096 sizes[["Repair"]] = c("8k", "15k", "33k", "66k", "135k", "271k", "566k", "1.1M", "2.2M", "4.6M", "9.3M", "18M", "37M") -toolList = read.csv("tool-list.csv", colClasses=c(rep("character",1))) +toolList = read.csv("tool-list.csv") # load the data -tsvs = list.files("../results/recent", pattern = "times-.*\\.csv", full.names = T, recursive = T) +tsvs = list.files("../results/merged/individual", pattern = "times-.*\\.csv", full.names = T, recursive = T) l = lapply(tsvs, read.csv) times = rbindlist(l) @@ -126,40 +127,42 @@ for (phase in phasesPrettified) { labs(title = paste("Individual query execution time,", phase, "phase"), x = "Model size\n#Elements", y = "Execution times [ms]") + geom_point(aes(col = Tool, shape = Tool), size = 2.0) + # scale_shape_manual(values = seq(0, 15)) + - scale_shape_manual(values = c(0, 15, 1, 16, 2, 17, 4, 7), - labels=c( - "Name Lookup ", "Name Lookup (Incremental)", # http://www.sthda.com/english/wiki/r-plot-pch-symbols-the-different-point-shapes-available-in-r - JastAdd NameLookup - "Intrinsic References", "Intrinsic References (Incremental)", # Tud-cyan - JastAdd Optimized - "Grammar Extension", "Grammar Extension (Incremental)", # HKS65 (green) - JastAdd Specialized - "TinkerGraph", # HKS92 (grey) - TinkerGraph - "Viatra (Incremental)", # HKS33 (violet) - VIATRA - "(none)" - )) + - scale_colour_manual(values = c( - "#EE7F00", "#EE7F00", # HKS07 (orange) - JastAdd NameLookup - "#009EE0", "#009EE0", # Tud-cyan - JastAdd Optimized - "#6AB023", "#6AB023", # HKS65 (green) - JastAdd Specialized - "#727879", # HKS92 (grey) - TinkerGraph - "#93107E", # HKS33 (violet) - VIATRA - "#F0E442", # Yellow - "#CC79A7"), - labels=c( - "Name Lookup ", "Name Lookup (Incremental)", # HKS07 (orange) - JastAdd NameLookup - "Intrinsic References", "Intrinsic References (Incremental)", # Tud-cyan - JastAdd Optimized - "Grammar Extension", "Grammar Extension (Incremental)", # HKS65 (green) - JastAdd Specialized - "TinkerGraph", # HKS92 (grey) - TinkerGraph - "Viatra (Incremental)", # HKS33 (violet) - VIATRA - "(none)" - )) + + # scale_shape_manual(#values = c(0, 15, 1, 16, 2, 17, 4, 7), + # # labels=c( + # # "Name Lookup ", "Name Lookup (Incremental)", # http://www.sthda.com/english/wiki/r-plot-pch-symbols-the-different-point-shapes-available-in-r - JastAdd NameLookup + # # "Intrinsic References", "Intrinsic References (Incremental)", # Tud-cyan - JastAdd Optimized + # # "Grammar Extension", "Grammar Extension (Incremental)", # HKS65 (green) - JastAdd Specialized + # # "TinkerGraph", # HKS92 (grey) - TinkerGraph + # # "Viatra (Incremental)", # HKS33 (violet) - VIATRA + # # "(none)" + # # ) + # ) + + # scale_colour_manual( + # values = c( + # "#EE7F00", "#EE7F00", # HKS07 (orange) - JastAdd NameLookup + # "#009EE0", "#009EE0", # Tud-cyan - JastAdd Optimized + # "#6AB023", "#6AB023", # HKS65 (green) - JastAdd Specialized + # "#727879", # HKS92 (grey) - TinkerGraph + # "#93107E", # HKS33 (violet) - VIATRA + # "#F0E442", # Yellow + # "#CC79A7"), + # labels=c( + # "Name Lookup ", "Name Lookup (Incremental)", # HKS07 (orange) - JastAdd NameLookup + # "Intrinsic References", "Intrinsic References (Incremental)", # Tud-cyan - JastAdd Optimized + # "Grammar Extension", "Grammar Extension (Incremental)", # HKS65 (green) - JastAdd Specialized + # "TinkerGraph", # HKS92 (grey) - TinkerGraph + # "Viatra (Incremental)", # HKS33 (violet) - VIATRA + # "(none)" + # )) + geom_line(aes(col = Tool, group = Tool), size = 0.5) + scale_x_discrete(breaks = xbreaks, labels = xlabels) + scale_y_log10(breaks = ybreaks, minor_breaks=yminor_breaks, labels = ylabels, limits = c(2e-3,8e4), expand = c(0, 0)) + facet_grid_paginate(~ Workload, nrow=1, ncol = 1, page=cpage, scale = "free") + - guides(color = guide_legend(ncol = 4)) + + guides(color = guide_legend(ncol = 5)) + theme_bw() + theme( plot.title = element_text(hjust = 0.5), - text = element_text(family="Open Sans", size = 10), + # text = element_text(family="Open Sans", size = 10), # legend.key = element_blank(), legend.title = element_blank(), legend.position = "bottom", @@ -170,7 +173,7 @@ for (phase in phasesPrettified) { ggsave( plot = p, filename = paste("../diagrams/recent/", phase.filename, "-",workloads[cpage], ".pdf", sep=""), - width = 150, height = 140, units = "mm" + width = 300, height = 280, units = "mm" ) embed_fonts(paste("../diagrams/recent/", phase.filename, "-",workloads[cpage], ".pdf", sep=""), outfile=paste("../diagrams/recent/", phase.filename, "-",workloads[cpage], "-embed", ".pdf", sep="")) } diff --git a/trainbenchmark/trainbenchmark-reporting/install.R b/trainbenchmark/trainbenchmark-reporting/install.R index 2bb4f2bf6..ebe6efe61 100644 --- a/trainbenchmark/trainbenchmark-reporting/install.R +++ b/trainbenchmark/trainbenchmark-reporting/install.R @@ -6,4 +6,4 @@ local({ }) install.packages("udunits2", configure.args = c(udunits2 = '--with-udunits2-include=/usr/include/udunits2')) -install.packages(c("ggplot2", "ggforce", "plyr", "ggrepel", "data.table", "arules", "purrr"), repos = "http://cran.rstudio.com/") +install.packages(c("ggplot2", "ggforce", "plyr", "ggrepel", "data.table", "arules", "purrr", "extrafont"), repos = "http://cran.rstudio.com/") diff --git a/trainbenchmark/trainbenchmark-reporting/merge_results.json b/trainbenchmark/trainbenchmark-reporting/merge_results.json index 37aba9be6..a8aede7f0 100644 --- a/trainbenchmark/trainbenchmark-reporting/merge_results.json +++ b/trainbenchmark/trainbenchmark-reporting/merge_results.json @@ -1,10 +1,15 @@ { "tools": [ + "WHY IS THE FIRST ONE IGNORED, RENE?", "tinkergraph", - "jastadd-java-references", - "jastadd-java-references-incremental", - "jastadd-symbolic-references-incremental", - "jastadd-symbolic-references", + "jastadd-intrinsic", + "jastadd-intrinsic-incremental", + "jastadd-manual-relast", + "jastadd-manual-relast-incremental", + "jastadd-namelookup", + "jastadd-namelookup-incremental", + "jastadd-relast", + "jastadd-relast-incremental", "viatra" ], "ignored": [ diff --git a/trainbenchmark/trainbenchmark-reporting/merge_results.py b/trainbenchmark/trainbenchmark-reporting/merge_results.py index a1fdb731e..537299a1d 100755 --- a/trainbenchmark/trainbenchmark-reporting/merge_results.py +++ b/trainbenchmark/trainbenchmark-reporting/merge_results.py @@ -238,5 +238,5 @@ if __name__ == '__main__': "-f", "--file-config", default='merge_results.json', help="Config file to use.") args = parser.parse_args() include_file_config(args) - logging.basicConfig(format=FORMAT, level=logging.DEBUG if args.verbose else logging.INFO) + logging.basicConfig(format=FORMAT, level=logging.DEBUG if args.verbose else logging.DEBUG) main(args) diff --git a/trainbenchmark/trainbenchmark-reporting/tool-list.csv b/trainbenchmark/trainbenchmark-reporting/tool-list.csv index a1c456ec8..a0c89a037 100644 --- a/trainbenchmark/trainbenchmark-reporting/tool-list.csv +++ b/trainbenchmark/trainbenchmark-reporting/tool-list.csv @@ -3,10 +3,9 @@ Name Lookup Name Lookup (Incremental) Intrinsic References Intrinsic References (Incremental) -Grammar Extension -Grammar Extension (Incremental) -Grammar Extension (Manual Serialization) -Grammar Extension (Manual Serialization, Incremental) +Grammar Extension with Manual Serialization +Grammar Extension with Manual Serialization (Incremental) +Grammar Extension with Serializer +Grammar Extension with Serializer (Incremental) TinkerGraph -VIATRA (Incremental) -VIATRA (Local Search) +VIATRA (Incremental) \ No newline at end of file diff --git a/trainbenchmark/trainbenchmark-reporting/tools.csv b/trainbenchmark/trainbenchmark-reporting/tools.csv index 562915d0d..842603c31 100644 --- a/trainbenchmark/trainbenchmark-reporting/tools.csv +++ b/trainbenchmark/trainbenchmark-reporting/tools.csv @@ -1,29 +1,11 @@ tool,format,storage -Drools,EMF,in-memory -Eclipse OCL,EMF,in-memory -EMF API,EMF,in-memory -VIATRA (Incremental),EMF,in-memory -VIATRA (Local Search),EMF,in-memory -Neo4j (Core API-CSV),property graph,disk-resident -Neo4j (Cypher-CSV),property graph,disk-resident -Neo4j (Core API-GraphML),property graph,disk-resident -Neo4j (Cypher-GraphML),property graph,disk-resident -Neo4j (Core API-Binary),property graph,disk-resident -Neo4j (Cypher-Binary),property graph,disk-resident -Jastadd (Symbolic References),JSON,in-memory -Jastadd (Incremental + Symbolic References),JSON,in-memory -Jastadd (Java References),JSON,in-memory -Jastadd (Incremental + Java References),JSON,in-memory +Name Lookup,JSON,in-memory +Name Lookup (Incremental),JSON,in-memory +Intrinsic References,JSON,in-memory +Intrinsic References (Incremental),JSON,in-memory +Grammar Extension with Manual Serialization,JSON,in-memory +Grammar Extension with Manual Serialization (Incremental),JSON,in-memory +Grammar Extension with Serializer,JSON,in-memory +Grammar Extension with Serializer (Incremental),JSON,in-memory TinkerGraph,property graph,in-memory -Blazegraph (No Inferencing),RDF,disk-resident -Blazegraph (Inferencing),RDF,disk-resident -Jena (Inferencing),RDF,in-memory -Jena (No Inferencing),RDF,in-memory -Kiama,JSON,in-memory -Racr (Scheme),JSON,in-memory -Racr (Python),JSON,in-memory -Racr (CPP),JSON,in-memory -RDF4J (Inferencing),RDF,in-memory -RDF4J (No Inferencing),RDF,in-memory -MySQL,SQL,disk-resident -SQLite,SQL,in-memory +VIATRA (Incremental),EMF,in-memory \ No newline at end of file diff --git a/trainbenchmark/trainbenchmark-reporting/toolwise.sh b/trainbenchmark/trainbenchmark-reporting/toolwise.sh index b9891085e..e64f70cd8 100755 --- a/trainbenchmark/trainbenchmark-reporting/toolwise.sh +++ b/trainbenchmark/trainbenchmark-reporting/toolwise.sh @@ -1,4 +1,4 @@ #!/bin/bash -python toolwise.py +python toolwise.py --verbose # --file-config <file> # --verbose diff --git a/trainbenchmark/trainbenchmark-scripts/src/main/resources/basic-settings.json b/trainbenchmark/trainbenchmark-scripts/src/main/resources/basic-settings.json index 8d4694694..9dd15c015 100644 --- a/trainbenchmark/trainbenchmark-scripts/src/main/resources/basic-settings.json +++ b/trainbenchmark/trainbenchmark-scripts/src/main/resources/basic-settings.json @@ -11,11 +11,10 @@ "Intrinsic References (Incremental)", "Grammar Extension with Serializer", "Grammar Extension with Serializer (Incremental)", - "Grammar Extension (Manual Serialization)", - "Grammar Extension (Manual Serialization, Incremental)", + "Grammar Extension with Manual Serialization", + "Grammar Extension with Manual Serialization (Incremental)", "TinkerGraph", - "VIATRA (Incremental)", - "VIATRA (Local Search)" + "VIATRA (Incremental)" ], "formats": [ "emf", diff --git a/trainbenchmark/trainbenchmark-tool-jastadd-manual-relast-incremental/src/main/java/de/tudresden/inf/st/train/jastadd/config/ManualRelastIncrementalBenchmarkConfig.java b/trainbenchmark/trainbenchmark-tool-jastadd-manual-relast-incremental/src/main/java/de/tudresden/inf/st/train/jastadd/config/ManualRelastIncrementalBenchmarkConfig.java index 33a1abfaf..9b5181294 100644 --- a/trainbenchmark/trainbenchmark-tool-jastadd-manual-relast-incremental/src/main/java/de/tudresden/inf/st/train/jastadd/config/ManualRelastIncrementalBenchmarkConfig.java +++ b/trainbenchmark/trainbenchmark-tool-jastadd-manual-relast-incremental/src/main/java/de/tudresden/inf/st/train/jastadd/config/ManualRelastIncrementalBenchmarkConfig.java @@ -10,7 +10,7 @@ public class ManualRelastIncrementalBenchmarkConfig extends JastaddAbstractBench @Override public String getToolName() { - return "Grammar Extension (Manual Serialization, Incremental)"; + return "Grammar Extension with Manual Serialization (Incremental)"; } @Override diff --git a/trainbenchmark/trainbenchmark-tool-jastadd-manual-relast/src/main/java/de/tudresden/inf/st/train/jastadd/config/ManualRelastBenchmarkConfig.java b/trainbenchmark/trainbenchmark-tool-jastadd-manual-relast/src/main/java/de/tudresden/inf/st/train/jastadd/config/ManualRelastBenchmarkConfig.java index 7b3bd1508..b9d89210f 100644 --- a/trainbenchmark/trainbenchmark-tool-jastadd-manual-relast/src/main/java/de/tudresden/inf/st/train/jastadd/config/ManualRelastBenchmarkConfig.java +++ b/trainbenchmark/trainbenchmark-tool-jastadd-manual-relast/src/main/java/de/tudresden/inf/st/train/jastadd/config/ManualRelastBenchmarkConfig.java @@ -11,7 +11,7 @@ public class ManualRelastBenchmarkConfig extends JastaddAbstractBenchmarkConfig @Override public String getToolName() { - return "Grammar Extension (Manual Serialization)"; + return "Grammar Extension with Manual Serialization"; } @Override -- GitLab