Changeset - 3aa4d95db0a9
[Not reviewed]
0 0 1
Hannes Muehleisen - 9 years ago 2016-08-16 10:42:07
hannes@muehleisen.org
new script
1 file changed with 40 insertions and 0 deletions:
0 comments (0 inline, 0 general)
vldb-protocols2.R
Show inline comments
 
new file 100644
 

	
 
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()
 

	
 

	
 

	
0 comments (0 inline, 0 general)