-
Notifications
You must be signed in to change notification settings - Fork 0
/
token_size.py
29 lines (26 loc) · 983 Bytes
/
token_size.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure()
#x_values = [500000,1000000,10000000,20000000,30000000]
#y_values_80 = [6.21,14.84,136.95,266.59,375.52]
#y_values_112 = [8.25,15.06,154.12,286.51,432.87]
#y_values_128 = [8.64,16.04,163.40,335.43,494.59]
#y_values_192 = [11.09,23.96,233.69,517.51,737.82]
#xticks=['500t','1m','10m','20m','30m']
x_values = [2**6,2**7,2**8,2**9,2**10,2**12]
y_values_ST = [7.3,15,29,58,117,468]
y_values_S3 = [2.3,4.6,9.1,19,39,156]
xticks=['2^6','2^7','2^8','2^9','2^10','2^12']
ax = plt.gca()
ax.set_xscale('log')
plt.plot(x_values, y_values_ST,'-gv')
plt.plot(x_values, y_values_S3,'-r+')
plt.legend(['ST','S^3'], loc='upper left')
plt.xticks(x_values,xticks)
fig.suptitle('Encrypted Query Size Overhead')
plt.xlabel('#Characters in the query')
plt.ylabel('Size in KB')
plt.autoscale(enable=True, axis='x', tight=True)#plt.axis('tight')
plt.grid()
fig.savefig('token_size_plot.pdf')
plt.show()