40 lines
1010 B
R
40 lines
1010 B
R
library(ggplot2)
|
|
library(dplyr, warn.conflicts = FALSE)
|
|
library(scales)
|
|
library(jsonlite)
|
|
library(readr)
|
|
|
|
# Load the arguments (argv)
|
|
args = commandArgs(trailingOnly=TRUE)
|
|
|
|
input_file = args[1]
|
|
|
|
df = read_delim(input_file, delim=",", comment="#") %>%
|
|
mutate(run = as.factor(run)) %>%
|
|
mutate(time_per_task_per_cpu = time_per_task_per_cpu * 1e9)
|
|
|
|
dpi = 96
|
|
h = 2
|
|
w = 6
|
|
|
|
# ---------------------------------------------------------------------
|
|
|
|
#p = ggplot(df, aes(x=run, y=time_per_task_per_cpu)) +
|
|
# geom_point() +
|
|
# theme_bw() +
|
|
# labs(
|
|
# x = "Number of run",
|
|
# y="get_ready_task() time (ns)",
|
|
# title="Nanos6: get ready task time")
|
|
|
|
p = ggplot(df, aes(x=time_per_task_per_cpu)) +
|
|
geom_boxplot() +
|
|
theme_bw() +
|
|
scale_x_continuous(breaks = breaks_pretty(10)) +
|
|
labs(
|
|
x="Average duration per task per CPU (ns / task * CPU)",
|
|
title="bench6.sched_get: average time to schedule N ready tasks")
|
|
|
|
ggsave(sprintf("%s.png", input_file), plot=p, width=w, height=h, dpi=dpi)
|
|
|