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

Private GIT Repository
udpate oe round
[Cipher_code.git] / OneRoundIoT / execution_opi.py
1 import matplotlib.pyplot as plt
2 import numpy as np
3 import pandas as pd
4 from ggplot import *
5
6 open=pd.read_csv("execution_openssl_rpi3.txt",sep='\t',header=None)
7 one=pd.read_csv("execution_oneround_rpi3.txt",sep='\t',header=None)
8
9
10 open=open.drop(open.columns[[4,5]], axis=1)
11 one=one.drop(one.columns[[0,4,5]], axis=1)
12
13 open.columns = ["Buffer","OpenSSL enc CBC","OpenSSL dec CBC", "OpenSSL (en|de)c CTR"]
14
15 one.columns=["OneRound enc DECB", "OneRound dec DECB", "OneRound (en|de)c CTR"]
16
17 print(one)
18 print(open)
19
20 res=pd.concat([open,one],axis=1)
21 #print(res)
22
23 res2 = pd.melt(res, id_vars=['Buffer'])
24
25 print(res2)
26
27
28 print(ggplot(res2,aes("Buffer","value")) +   \
29     geom_line(aes(colour="variable")) + \
30 #    geom_line(color='coral') + \
31     scale_x_continuous("Buffer size",trans="log10") + \
32     scale_y_continuous("Bytes per second",trans="log10",breaks=[1e7,2e8,1e7]))
33 #    theme(axis_text=element_text(size=20, color='green'), x_axis_text=element_text(angle=45)) +\
34
35
36 #    annotation_logticks())
37     #scale_x_date(breaks=date_breaks('36 months'), labels='%Y') + \
38 #    scale_y_continuous(labels='millions'))
39
40       
41       #theme(legend.position="top") 
42  # geom_line(aes(colour="Legend"))) +\