4 setwd("~/work/Cipher_code/OneRoundIoT/")
6 openrpi3=read.csv('execution_openssl_rpi3.txt',sep="\t",header=F)
7 onerpi3=read.csv('execution_oneround_rpi3.txt',sep="\t",header=F)
9 openrpi3=openrpi3[c(1,2,3,5)]
10 onerpi3=onerpi3[c(2,3,5)]
12 res=data.frame(openrpi3,onerpi3)
13 names(res)=c("Buffer","OpenSSL enc CBC","OpenSSL dec CBC", "OpenSSL (en|de)c CTR", "OneRound enc DECB", "OneRound dec DECB", "OneRound (en|de)c CTR")
19 df2 <- melt(data = res, id.vars = 1)
20 #names(df2)[2]="Legend"
21 #names(df2)[3]="Accuracy"
24 #g=ggplot(res, aes(iteration)) +
25 # geom_line(aes(y = test, colour = "testing accuracy")) +
26 # geom_line(aes(y = train, colour = "training accuracy"))+
28 g=ggplot(data = df2, aes(x=Buffer, y=value)) + geom_line(aes(colour=variable)) + scale_x_log10("Buffer size") +
29 scale_y_log10("Bytes per second")+annotation_logticks(sides="trbl")
30 #g <- ggplot(data = df2, aes(x = 1, y = 3, colour = 2)) + geom_line()+scale_color_manual(values=c("#888888", "#000000"))+
31 #theme(legend.justification=c(1,0), legend.position=c(1,0))
32 ggsave("execution_rpi3.pdf",width = 15, height = 10, units = "cm")