forked from rucsgss/thesis
-
Notifications
You must be signed in to change notification settings - Fork 1
/
br-synthetic-plots.tex
174 lines (170 loc) · 6.6 KB
/
br-synthetic-plots.tex
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
% !TEX root = paper.tex
\begin{figure*}[p]
\centering
\ref{synth-legend}\\
\begin{subfigure}{0.49\linewidth}
\tikzsetnextfilename{synthetic-uniform}
\begin{tikzpicture}%[trim axis left, trim axis right]
\begin{axis}[
width=\hsize,
height=0.28\textheight,
xlabel=Rows inserted in millions,
xlabel near ticks,
ylabel near ticks,
ylabel style={align=center},
ylabel=Recycle rate ,
xmin=0.05,
xmax=5,
ymin=0,
ymax=50,
mark repeat={50},
restrict y to domain=0:50,
legend to name=synth-legend,
legend columns = 3,
]
\addplot [mark=*, blue, mark size=2] table [x=insertions, y expr=50000.0/\thisrow{flushes}, col sep=comma] {./br-data/simulations/gg_uni.csv};
\addlegendentry{Golden Gate}
\addplot [mark=square*, red, mark size=2] table [x=insertions, y expr=50000.0/\thisrow{flushes}, col sep=comma] {./br-data/simulations/rb_uni.csv};
\addlegendentry{Random Ball}
\addplot [mark=triangle*, green, mark size=2] table [x=insertions, y expr=50000.0/\thisrow{flushes}, col sep=comma] {./br-data/simulations/fb_uni.csv};
\addlegendentry{Fullest Bin}
\end{axis}
\end{tikzpicture}
\caption{Uniform key distribution}\label{fig:synth-uni}
\end{subfigure}
\hfill
\begin{subfigure}{0.49\linewidth}
\tikzsetnextfilename{synthetic-pareto-5}
\begin{tikzpicture}%[trim axis left, trim axis right]
\begin{axis}[
width=\hsize,
height=0.28\textheight,
xlabel=Rows inserted in millions,
xlabel near ticks,
ylabel near ticks,
ylabel style={align=center},
ylabel=Recycle rate ,
xmin=0.05,
xmax=5,
ymin=0,
ymax=50,
mark repeat={50},
restrict y to domain=0:50,
]
\addplot [mark=*, blue, mark size=2] table [x=insertions, y expr=50000.0/\thisrow{flushes}, col sep=comma] {./br-data/simulations/gg_par5.csv};
\addplot [mark=square*, red, mark size=2] table [x=insertions, y expr=50000.0/\thisrow{flushes}, col sep=comma] {./br-data/simulations/rb_par5.csv};
\addplot [mark=triangle*, green, mark size=2] table [x=insertions, y expr=50000.0/\thisrow{flushes}, col sep=comma] {./br-data/simulations/fb_par5.csv};
\end{axis}
\end{tikzpicture}
\caption{Pareto-0.5 key distribution}\label{fig:synth-par5}
\end{subfigure}
\\
\begin{subfigure}{0.49\linewidth}
\tikzsetnextfilename{synthetic-pareto-1}
\begin{tikzpicture}%[trim axis left, trim axis right]
\begin{axis}[
width=\hsize,
height=0.28\textheight,
xlabel=Rows inserted in millions,
xlabel near ticks,
ylabel near ticks,
ylabel style={align=center},
ylabel=Recycle rate ,
xmin=0.05,
xmax=5,
ymin=0,
ymax=50,
mark repeat={50},
restrict y to domain=0:50,
]
\addplot [mark=*, blue, mark size=2] table [x=insertions, y expr=50000.0/\thisrow{flushes}, col sep=comma] {./br-data/simulations/gg_par1.csv};
\addplot [mark=square*, red, mark size=2] table [x=insertions, y expr=50000.0/\thisrow{flushes}, col sep=comma] {./br-data/simulations/rb_par1.csv};
\addplot [mark=triangle*, green, mark size=2] table [x=insertions, y expr=50000.0/\thisrow{flushes}, col sep=comma] {./br-data/simulations/fb_par1.csv};
\end{axis}
\end{tikzpicture}
\caption{Pareto-1 key distribution}\label{fig:synth-par1}
\end{subfigure}
\hfill
\begin{subfigure}{0.49\linewidth}
\tikzsetnextfilename{synthetic-pareto-2}
\begin{tikzpicture}%[trim axis left, trim axis right]
\begin{axis}[
width=\hsize,
height=0.28\textheight,
xlabel=Rows inserted in millions,
xlabel near ticks,
ylabel near ticks,
ylabel style={align=center},
ylabel=Recycle rate ,
xmin=0.05,
xmax=5,
ymin=0,
ymax=50,
mark repeat={50},
restrict y to domain=0:50,
]
\addplot [mark=*, blue, mark size=2] table [x=insertions, y expr=50000.0/\thisrow{flushes}, col sep=comma] {./br-data/simulations/gg_par2.csv};
\addplot [mark=square*, red, mark size=2] table [x=insertions, y expr=50000.0/\thisrow{flushes}, col sep=comma] {./br-data/simulations/rb_par2.csv};
\addplot [mark=triangle*, green, mark size=2] table [x=insertions, y expr=50000.0/\thisrow{flushes}, col sep=comma] {./br-data/simulations/fb_par2.csv};
\end{axis}
\end{tikzpicture}
\caption{Pareto-2 key distribution}\label{fig:synth-par2}
\end{subfigure}
\\
\begin{subfigure}{0.49\linewidth}
\tikzsetnextfilename{synthetic-normal}
\begin{tikzpicture}%[trim axis left, trim axis right]
\begin{axis}[
width=\hsize,
height=0.28\textheight,
xlabel=Rows inserted in millions,
xlabel near ticks,
ylabel near ticks,
ylabel style={align=center},
ylabel=Recycle rate ,
xmin=0.05,
xmax=5,
ymin=0,
ymax=50,
mark repeat={50},
restrict y to domain=0:50,
]
\addplot [mark=*, blue, mark size=2] table [x=insertions, y expr=50000.0/\thisrow{flushes}, col sep=comma] {./br-data/simulations/gg_norm.csv};
\addplot [mark=square*, red, mark size=2] table [x=insertions, y expr=50000.0/\thisrow{flushes}, col sep=comma] {./br-data/simulations/rb_norm.csv};
\addplot [mark=triangle*, green, mark size=2] table [x=insertions, y expr=50000.0/\thisrow{flushes}, col sep=comma] {./br-data/simulations/fb_norm.csv};
\end{axis}
\end{tikzpicture}
\caption{Normal key distribution}\label{fig:synth-norm}
\end{subfigure}
\hfill
\begin{subfigure}{0.49\linewidth}
\tikzsetnextfilename{synthetic-norm-ratio}
\pgfplotstableread[col sep = comma]{./br-data/simulations/gg_norm.csv}\goldengate
\pgfplotstableread[col sep = comma]{./br-data/simulations/rb_norm.csv}\randomball
\pgfplotstablecreatecol[copy column from table={\randomball}{flushes}] {rb_flushes} {\goldengate}
\begin{tikzpicture}%[trim axis left, trim axis right]
\begin{axis}[
width=\hsize,
height=0.28\textheight,
xlabel=Rows inserted in millions,
xlabel near ticks,
ylabel near ticks,
ylabel style={align=center},
ylabel=Recycle rate ratio ,
xmin=0.05,
xmax=5,
ymin=0.8,
ymax=2,
mark repeat={50},
]
\addplot [mark=*, Plum, no marks] table [x=insertions, y expr=\thisrow{rb_flushes}/\thisrow{flushes}] \goldengate;
\end{axis}
\end{tikzpicture}
\caption{Ratio of golden gate to random ball (normally distributed keys)}\label{fig:synth-ratio}
\end{subfigure}
\caption{\label{fig:synth}Simulated results with various key distributions and recycling strategies. Recycle rates are taken over the latest 50,000 insertions. (Higher is better)}
\end{figure*}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "paper.tex"
%%% End: