From 3aa4d95db0a96742e26125d75ca38498e576f871 2016-08-16 10:42:07 From: Hannes Muehleisen Date: 2016-08-16 10:42:07 Subject: [PATCH] new script --- diff --git a/vldb-protocols2.R b/vldb-protocols2.R new file mode 100644 index 0000000000000000000000000000000000000000..b4739f52396efd062bbbefe4a9544002843b0d20 --- /dev/null +++ b/vldb-protocols2.R @@ -0,0 +1,40 @@ + +library(dplyr) +library(ggplot2) +library(ggthemes) + +theme <- theme_few(base_size = 24) + +theme(axis.title.y=element_text(vjust=0.9), + axis.title.x=element_text(vjust=-0.1), + axis.ticks.x=element_blank(), + text=element_text(family="serif")) + + +read.table("12.csv", header=T, sep=",", stringsAsFactors=F, na.strings="-1") -> dd3 + + +sysnames <- c("mariadb-default"="MySQL", "mariadb-compress"="MySQL+C", "oracle-default"="DBMS X", "postgres-default" = "PostgreSQL", "db2-default" = "DB2", "monetdb-default"="MonetDB", "hbase-default" = "HBase", "hive-default" = "Hive", "mongodb-default" = "MongoDB") + +dd3 %>% filter(network=="unlimited", protocol == "native", timeout != 1, system %in% c("hive-default", "hbase-default", "mariadb-default", "mariadb-compress", "db2-default", "oracle-default", "postgres-default", "monetdb-default", "mongodb-default"), tuple %in% c(1, 1000000)) %>% mutate(system=sysnames[system]) %>% select(system, tuple, time, bytes) %>% group_by(system, tuple) %>% summarise_each(funs(mean)) -> dd4 + +dd5 <- dd4 %>% filter(tuple==1000000) %>% rename(time_1m=time, bytes_1m=bytes) %>% left_join(dd4 %>% filter(tuple == 1) %>% rename(time_1=time, bytes_1=bytes), by="system") %>% mutate(tuple_time_ms=((time_1m-time_1)/1000000)*1000, tuple_bytes=(bytes_1m-bytes_1)/1000000) + + +pdf("time-per-tuple.pdf", width=10, height=5) + +ggplot(dd5, aes( y=tuple_time_ms, x=reorder(system, -tuple_time_ms), label=round(tuple_time_ms, 4))) + geom_bar(stat="identity", position="dodge", width=.5) + theme + xlab("") + ylab("Time per tuple (ms)") + coord_flip() + guides(fill=FALSE) + geom_text(size=7, hjust=-.2, family="serif") + scale_y_continuous(limits=c(0, .03)) + + +dev.off() + + +pdf("bytes-per-tuple.pdf", width=10, height=5) + + +ggplot(dd5, aes( y=tuple_bytes, x=reorder(system, -tuple_bytes), label=round(tuple_bytes))) + geom_bar(stat="identity", position="dodge", width=.5) + theme + xlab("") + ylab("Bytes per tuple") + coord_flip() + guides(fill=FALSE) + geom_text(size=7, hjust=-.2, family="serif") + scale_y_continuous(limits=c(0, 410)) + + +dev.off() + + +