mistral-io-datasets/scripts/plot-performance.R

23 lines
1.0 KiB
R
Raw Normal View History

2020-08-21 16:21:33 +00:00
#!/usr/bin/env Rscript
library(ggplot2)
library(dplyr)
require(scales)
2020-08-25 17:00:28 +00:00
args = commandArgs(trailingOnly = TRUE)
file = "datasets/progress_4296426.csv" # for manual execution
file = args[1]
prefix = args[2]
2020-08-21 16:21:33 +00:00
2020-08-25 17:00:28 +00:00
# Plot the performance numbers of the analysis
data = read.csv(file)
2020-08-21 16:21:33 +00:00
e = data %>% filter(jobs_done >= (jobs_total - 9998))
2020-08-25 17:00:28 +00:00
e$time_per_100k = e$elapsed / (e$jobs_done / 100000)
ggplot(e, aes(alg_name, time_per_100k, fill=alg_name)) + geom_boxplot() + theme(legend.position=c(0.2, 0.7)) + xlab("Algorithm") + ylab("Runtime in s per 100k jobs") + stat_summary(aes(label=round(..y..,0)), position = position_nudge(x = 0, y = 250), fun=mean, geom="text", size=4)
ggsave(paste(prefix, "-boxplot.png", sep=""), width=5, height=4)
# Development when adding more jobs
ggplot(data, aes(x=jobs_done, y=elapsed, color=alg_name)) + geom_point() + ylab("Cummulative runtime in s") + xlab("Jobs processed") + theme(legend.position = "bottom") #+ scale_x_log10() + scale_y_log10()
ggsave(paste(prefix, "-cummulative.png", sep=""), width=6, height=4.5)