Brandon Holt allow loading ldbc data from json file  about 9 years ago

Commit id: 9783bcc63075aea487aeb1b2678e7fe59fe03be5

deletions | additions      

       

}  data.ldbc <- function(where = "ldbc_config is not null") {  d d.all <- if(DATA.MODE == 'local') {  d_ldbc  <- do.call("rbind", fromJSON("ldbc.json"))  sqldf(sprintf("select * from d_ldbc where ldbc_results is not null and %s",where), drv="SQLite")  } else {  db(sprintf("select * from ldbc where ldbc_results is not null and ldbc_results != \"\" and %s", where)) }  d <- d <- subset(d.all, grepl("\\s*\\{",ldbc_results))    d$cc <- factor(revalue(d$ccmode, c(  # 'bottom'='base',         

# setwd('/Users/bholt/hub/claret/data')  source('common.R')  DATA.MODE <- 'local'  d <- data.ldbc(where="name like '%-multinode'")  # d$ntotal <- factor(d$ntotal) 

facet_wrap(~name)+  scale_x_log10(breaks=trans_breaks("log10", function(x) 10^x),  labels=trans_format("log10", math_format(10^.x)))+  cc_scales()+  my_theme()  # scale_fill_manual(values=my_palette, name='Variant')+  # scale_color_manual(values=my_palette, name='Variant')  , name='ldbc_explore', name='explore_ldbc', w=10, h=8)  save(  ggplot(subset(d,  # ccmode == 'simple'  ntotal == 50000  # & name == 'AddPost'  ), aes(  x = snb_time_ratio,  y = time_50th_percentile,  group = cc,  fill = cc,  color = cc,  label = ntotal,  ))+  geom_point()+  # geom_text(size=1.7)+  # stat_summary(aes(label=ntotal), fun.y=mean, geom="text")+  stat_smooth()+  expand_limits(y=0)+  facet_wrap(~name)+  scale_x_log10(breaks=trans_breaks("log10", function(x) 10^x),  labels=trans_format("log10", math_format(10^.x)))+  cc_scales()+  my_theme()  , name='explore_latency',  w=10, h=8) save(  ggplot(subset(d, 

# & name == 'Query2'  ), aes(  x = snb_time_ratio,  y = total_time / 1e6, server_cc_check_failed,  group = cc,  fill = cc,  color = cc, 

facet_wrap(~name)+  scale_x_log10(breaks=trans_breaks("log10", function(x) 10^x),  labels=trans_format("log10", math_format(10^.x)))+  cc_scales()+  my_theme()  # scale_fill_manual(values=my_palette, name='Variant')+  # scale_color_manual(values=my_palette, name='Variant')  , name='explore_retries', w=10, h=8)  save(  ggplot(subset(d, ntotal==50000), aes(  x = name,  y = time_count,  fill = name,  color = name,  group = name,  ))+  geom_meanbar()+  theme(axis.text.x = element_text(angle=90, hjust=1, vjust=0))+  expand_limits(y=0)+  my_theme()  , name='explore_counts', w=8, h=6)