Skip to content

Commit

Permalink
make the benchmark pdf "better"
Browse files Browse the repository at this point in the history
  • Loading branch information
fmontoto committed Sep 15, 2016
1 parent 1b24ddb commit a520b35
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
12 changes: 6 additions & 6 deletions benchmark/k2_trees/k2tree.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
K2_BV;k2_tree<2, bit_vector, bit_vector::rank_1_type>;K2BV
K3_BV;k2_tree<3, bit_vector, bit_vector::rank_1_type>;K3BV
K4_BV;k2_tree<4, bit_vector, bit_vector::rank_1_type>;K4BV
# K2_RRR63V;k2_tree<2, rrr_vector<63>, rrr_vector<63>::rank_1_type>;K2RRR63V
# K3_RRR63V;k2_tree<3, rrr_vector<63>, rrr_vector<63>::rank_1_type>;K3RRR63V
# K4_RRR63V;k2_tree<4, rrr_vector<63>, rrr_vector<63>::rank_1_type>;K4RRR63V
# K2_RRR126V;k2_tree<2, rrr_vector<126>, rrr_vector<126>::rank_1_type>;K2RRR126V
# K3_RRR126V;k2_tree<3, rrr_vector<126>, rrr_vector<126>::rank_1_type>;K3RRR126V
# K4_RRR126V;k2_tree<4, rrr_vector<126>, rrr_vector<126>::rank_1_type>;K4RRR126V
K2_RRR63V;k2_tree<2, rrr_vector<63>, rrr_vector<63>::rank_1_type>;K2RRR63V
K3_RRR63V;k2_tree<3, rrr_vector<63>, rrr_vector<63>::rank_1_type>;K3RRR63V
K4_RRR63V;k2_tree<4, rrr_vector<63>, rrr_vector<63>::rank_1_type>;K4RRR63V
K2_RRR126V;k2_tree<2, rrr_vector<126>, rrr_vector<126>::rank_1_type>;K2RRR126V
K3_RRR126V;k2_tree<3, rrr_vector<126>, rrr_vector<126>::rank_1_type>;K3RRR126V
K4_RRR126V;k2_tree<4, rrr_vector<126>, rrr_vector<126>::rank_1_type>;K4RRR126V
# K2_ILV;k2_tree<2, bit_vector_il<512>, bit_vector_il<512>::rank_1_type>;K2_ILV
# K3_ILV;k2_tree<3, bit_vector_il<512>, bit_vector_il<512>::rank_1_type>;K3_ILV
# K4_ILV;k2_tree<4, bit_vector_il<512>, bit_vector_il<512>::rank_1_type>;K4_ILV
Expand Down
21 changes: 10 additions & 11 deletions benchmark/k2_trees/visualize/k2.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ plot_size_figure <-function(data,heading,ylab=F){
}
#label x-axis
axis(1)
mtext("Size relative to original file size", side=1, line=2)
mtext("Size relative to original file size (arc file)", side=1, line=2)

#draw bars
offset=0.1
Expand Down Expand Up @@ -106,8 +106,8 @@ for(tc in unique(maindata$TC_ID)){

open_tikz( fig_name )

layout(matrix(c(1,2,3), 3, 2, byrow = TRUE),
widths=c(1.35,1), heights=c(1,1,1))
layout(matrix(c(1,2,3), nrow=3, ncol=1, byrow = TRUE),
widths=c(1,1,1), heights=c(1))

#adj-plot
a <-data['adj_time']
Expand All @@ -117,12 +117,12 @@ for(tc in unique(maindata$TC_ID)){
#neighbors-plot
neighbors <-data['neighbors_time']
rownames(neighbors)<-id
plot_time_figure(t(neighbors),"\\tt{neighbors}",ylab=F,xlab=F,xmax=xmax)
plot_time_figure(t(neighbors),"\\tt{neighbors}",xlab=F,xmax=xmax)

#reverse_neighbors-plot
s <-data['reverse_neighbors_time']
rownames(s)<-id
plot_time_figure(t(s),"\\tt{reverse_neighbors}",xlab=F,xmax=xmax)
plot_time_figure(t(s),"\\tt{reverse_neighbors}",xmax=xmax)

old<-par()
dev.off()
Expand All @@ -135,27 +135,26 @@ for(tc in unique(maindata$TC_ID)){
fig_name <- paste("fig-page2-",tc,".tex",sep="")
open_tikz( fig_name )

layout(matrix(c(1,2,3), 3, 2, byrow = TRUE),
widths=c(1.35,1), heights=c(1,1,1))
layout(matrix(c(1, 2, 3), 3, 1, byrow=TRUE),
widths=c(1,1,1), heights=c(1))

#constructor-plot
con <-data['constructs_time']
rownames(con)<-id
plot_time_figure(t(con),"\\tt{construct}",ylab=F,xlab=F,constructor=T)
plot_time_figure(t(con),"\\tt{construct}",xlab=F,constructor=T)

#construction-size-plot
tsize<-data[[1,'TC_SIZE']]
consize <-(data['constructs_space']/tsize)*100
rownames(consize)<-id

plot_size_figure(t(consize),"\\tt{construction space}",ylab=T)
plot_size_figure(t(consize),"\\tt{construction space}", ylab=T)

#size-plot
tsize<-data[[1,'TC_SIZE']]
size <-(data['k2_size']/tsize)*100
rownames(size)<-id

plot_size_figure(t(size),"\\tt{space}")
plot_size_figure(t(size),"\\tt{space}", ylab=T)

dev.off()
tex_doc <- paste(tex_doc,"\\begin{figure}[H]
Expand Down

0 comments on commit a520b35

Please sign in to comment.