library(plotly)
## Loading required package: ggplot2
## Registered S3 methods overwritten by 'ggplot2':
## method from
## [.quosures rlang
## c.quosures rlang
## print.quosures rlang
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
source("/home/and/Documents/PhD/Research/Scripts/R/R13/tasksMetrics.R")
## Registered S3 method overwritten by 'rvest':
## method from
## read_xml.response xml2
## ── Attaching packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse 1.2.1 ──
## ✔ tibble 2.1.1 ✔ purrr 0.3.2
## ✔ tidyr 0.8.3 ✔ dplyr 0.8.0.1
## ✔ readr 1.3.1 ✔ stringr 1.4.0
## ✔ tibble 2.1.1 ✔ forcats 0.4.0
## ── Conflicts ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks plotly::filter(), stats::filter()
## ✖ dplyr::lag() masks stats::lag()
nohup = "/home/and/Documents/PhD/Research/Scripts/Misc/tmp/nohup.tsv"
appsE1_1 = getCustomStages(nohup, 282)
## Warning: Calling `as_tibble()` on a vector is discouraged, because the behavior is likely to change in the future. Use `tibble::enframe(name = NULL)` instead.
## This warning is displayed once per session.
appsE1_2 = getCustomStages(nohup, 284)
appsE1_3 = getCustomStages(nohup, 286)
stagesE1 = rbind(appsE1_1,appsE1_2,appsE1_3)
appsE3_1 = getCustomStages(nohup, 281)
appsE3_2 = getCustomStages(nohup, 283)
appsE3_3 = getCustomStages(nohup, 285)
stagesE3 = rbind(appsE3_1,appsE3_2,appsE3_3)
stages = rbind(stagesE1, stagesE3) %>% select(Interval, Stage, Executors, Duration) %>%
mutate(Stage = paste(str_pad(Interval,2,"left"), Stage)) %>%
select(Stage, Executors, Duration) %>%
group_by(Stage, Executors) %>% summarise(Duration = mean(Duration))
head(stages)
p = ggplot(data = stages, aes(x = Stage, y = Duration, fill = Executors)) +
geom_bar(stat="identity", position=position_dodge(width = 0.75), width = 0.7) +
theme(axis.text.x = element_text(angle = 90, hjust = 1)) +
labs(x="Stages", y="Duration(s)")
ggplotly(p)