Skip to content
Snippets Groups Projects
Commit 2bbb83c8 authored by Millian Poquet's avatar Millian Poquet
Browse files

viz script: only keep relevant parts /artifacts

parent 3d14aae9
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env Rscript
library(tidyverse)
library(GGally)
library(viridis)
agg_file = '/tmp/agg-result.csv'
agg_file = './expe1/agg-result.csv'
output_dir = '/tmp'
epoch_m100 = ymd_hms('2022-01-01 00:00:00')
`%notin%` = Negate(`%in%`)
......@@ -91,7 +90,7 @@ ggsave(sprintf("%s/utilization-against-powercap-predictor.pdf", output_dir), wid
# mean turnaround time metrics
data_nz %>% ggplot(aes(x=powercap_dynamic_value_ratio, y=mean_turnaround_time_minus_zero, color=predictor_name)) +
geom_jitter(width=1/100, height=0) +
geom_point() +
geom_smooth(method = "lm", se = FALSE) +
geom_hline(yintercept=0) +
theme_bw() +
......@@ -104,58 +103,17 @@ data_nz %>% ggplot(aes(x=powercap_dynamic_value_ratio, y=mean_turnaround_time_mi
expand_limits(x=0) +
labs(
y="Mean turnaround time difference against EASY without any powercap for each simulation",
x="Powercap value (proportion of the maximum dynamic power range). Shown with horizontal jitter."
x="Powercap value (proportion of the maximum dynamic power range)"
)
ggsave(sprintf("%s/mean-turnaround-time-against-powercap-predictor.pdf", output_dir), width=16, height=9)
# mean waiting time
data_nz %>% ggplot(aes(x=powercap_dynamic_value_ratio, y=mean_waiting_time_minus_zero, color=predictor_name)) +
geom_jitter(width=1/100, height=0) +
geom_smooth(method = "lm", se = FALSE) +
geom_hline(yintercept=0) +
theme_bw() +
theme(legend.position='top', legend.title=element_blank()) +
guides(color = guide_legend(nrow = 1)) +
scale_x_continuous(breaks=seq(0,0.7,0.1), labels = scales::percent) +
scale_y_continuous() +
scale_color_viridis(discrete=TRUE) +
facet_wrap(vars(start_dt_s), scales='free_y') +
expand_limits(x=0) +
labs(
y="Mean waiting time difference against EASY without any powercap for each simulation",
x="Powercap value (proportion of the maximum dynamic power range). Shown with horizontal jitter."
)
ggsave(sprintf("%s/mean-waiting-time-against-powercap-predictor.pdf", output_dir), width=16, height=9)
# power (mean+p1+p99) for all instances, facetted by workload, colored by predictor
max_observed_total_power = 955080
max_power_per_node = 2100.0
min_power_per_node = 240.0
nb_nodes = 980
max_dynamic_power = max_observed_total_power - min_power_per_node * nb_nodes
data_nz %>% ggplot(aes(x=powercap_dynamic_value_ratio)) +
#geom_jitter(width=1/100, height=0) +
#geom_smooth(method = "lm", se = FALSE) +
geom_ribbon(aes(ymin=power_p1/max_dynamic_power, ymax=power_p99/max_dynamic_power, fill=predictor_name), alpha=0.1) +
geom_line(aes(y=mean_power/max_dynamic_power, color=predictor_name)) +
geom_line(aes(y=power_p1/max_dynamic_power, color=predictor_name), linetype='dotted', show.legend = FALSE) +
geom_line(aes(y=power_p99/max_dynamic_power, color=predictor_name), linetype='dotted', show.legend = FALSE) +
geom_abline(slope=1) +
theme_bw() +
theme(legend.position='top', legend.title=upper_bound) +
scale_color_viridis(discrete=TRUE) +
scale_fill_viridis(discrete=TRUE) +
facet_wrap(vars(start_dt_s)) +
expand_limits(x=0) +
labs(
y="Power consumption during the powercap-constrained 3-hour time window (proportion of the maximum dynamic power range).",
x="Powercap value (proportion of the maximum dynamic power range)."
)
ggsave(sprintf("%s/power-consumption-mean-p1-p99-against-powercap-predictor.pdf", output_dir), width=16, height=9)
# distribution of the mean power used for each predictor
#powercap_ratios_values_to_show = c(0.1, 0.25, 0.4, 0.55, 0.7)
powercap_ratios_values_to_show = c(0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7)
width_scale=0.3
data_nz %>%
......@@ -211,7 +169,6 @@ data_nz %>%
scale=0.9
ggsave(sprintf("%s/sched-mtt-distribution.pdf", output_dir), width=8*scale, height=4*scale)
# show all columns...
options(dplyr.width = Inf)
......@@ -319,30 +276,14 @@ against_mean = data_p_mtt %>%
all_above_mean = real_mean_above_mean & upper_bound_above_mean & real_max_above_mean & max_above_mean
)
# overview of whether each predictor breaks the powercap
data %>%
mutate(breaks_powercap = surplus_energy > 0) %>%
group_by(predictor_name, breaks_powercap) %>%
summarize(occ=n())
data_nz %>% filter(start_dt_s != 18474670) %>% ggplot(aes(x=predictor_name, y=mean_waiting_time_minus_zero)) +
geom_violin() +
geom_jitter(alpha=0.1) +
geom_boxplot(width=1/8, outlier.shape=NA) +
facet_wrap(vars(start_dt_s)) +
theme_bw()
data_nz %>% filter(start_dt_s != 18474670) %>% ggplot(aes(y=energy_from_powercap / 1e9, x=mean_utilization / 980, color=predictor_name)) +
geom_point() +
stat_ellipse() +
theme_bw() +
#facet_wrap(vars(powercap_dynamic_value_ratio)) +
scale_color_viridis(discrete=TRUE)
ggsave(sprintf("%s/meh1.pdf", output_dir), width=16, height=9)
data %>% ggplot() +
data_nz %>% ggplot() +
geom_violin(aes(x=predictor_name, y=energy_from_powercap / 1e9)) +
geom_jitter(aes(x=predictor_name, y=energy_from_powercap / 1e9), alpha=0.1) +
geom_boxplot(aes(x=predictor_name, y=energy_from_powercap / 1e9), width=0.025, outlier.shape=NA) +
......@@ -351,8 +292,9 @@ data %>% ggplot() +
x="Power predictor",
y="Distribution of the energy consumed during the constrained period for each simulation (GJ).\nComputed as the integral of the dynamic power minus the dynamic powercap value."
)
ggsave(sprintf("%s/meh2.pdf", output_dir), width=16, height=9)
data %>% ggplot() +
data_nz %>% ggplot() +
geom_violin(aes(x=predictor_name, y=surplus_energy / 1e9)) +
geom_jitter(aes(x=predictor_name, y=surplus_energy / 1e9), alpha=0.1) +
geom_boxplot(aes(x=predictor_name, y=surplus_energy / 1e9), width=0.025, outlier.shape=NA) +
......@@ -361,8 +303,9 @@ data %>% ggplot() +
x="Power predictor",
y="Distribution of the surplus energy consumed during the constrained period for each simulation (GJ).\nComputed as the integral of the dynamic power minus the dynamic powercap value, only keeping positive values."
)
ggsave(sprintf("%s/meh3.pdf", output_dir), width=16, height=9)
data %>% ggplot() +
data_nz %>% ggplot() +
geom_violin(aes(x=predictor_name, y=unused_energy / 1e9)) +
geom_jitter(aes(x=predictor_name, y=unused_energy / 1e9), alpha=0.1) +
geom_boxplot(aes(x=predictor_name, y=unused_energy / 1e9), width=0.025, outlier.shape=NA) +
......@@ -371,3 +314,4 @@ data %>% ggplot() +
x="Power predictor",
y="Distribution of the unused energy consumed during the constrained period for each simulation (GJ).\nComputed as the integral of the dynamic power minus the dynamic powercap value, only keeping negative values."
)
ggsave(sprintf("%s/meh4.pdf", output_dir), width=16, height=9)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment