]> AND Private Git Repository - Cipher_code.git/blob - OneRoundIoT/execution_opi.R
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
improvement
[Cipher_code.git] / OneRoundIoT / execution_opi.R
1 library("ggplot2")
2 library(reshape2)
3
4 setwd("~/work/Cipher_code/OneRoundIoT/")
5
6 openrpi3=read.csv('execution_openssl_opi.txt',sep="\t",header=F)
7 onerpi3=read.csv('execution_oneround_opi.txt',sep="\t",header=F)
8
9 openrpi3=openrpi3[c(1,2,3,5)]
10 onerpi3=onerpi3[c(2,3,5)]
11
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")
14
15
16
17
18
19 df2 <- melt(data = res, id.vars = 1)
20
21 names(df2)[2]="Legend"
22 #names(df2)[3]="Accuracy"
23
24   
25 #g=ggplot(res, aes(iteration)) + 
26 #  geom_line(aes(y = test, colour = "testing accuracy")) + 
27 #  geom_line(aes(y = train, colour = "training accuracy"))+
28  
29 g=ggplot(data = df2, aes(x=Buffer, y=value)) + geom_line(aes(colour=Legend)) + 
30   scale_x_continuous("Buffer size",trans="log10") +
31   scale_y_continuous("Bytes per second",trans="log10",breaks=seq(1e7,2e8,1e7))+
32   theme(legend.position="top")+
33   annotation_logticks()     
34
35
36 ggsave("execution_opi.pdf",width = 15, height = 10, units = "cm")
37   
38 print(g)