Skip to content

Commit

Permalink
Merge pull request #63 from CCBR/iss-49
Browse files Browse the repository at this point in the history
update total usage plot
  • Loading branch information
kelly-sovacool authored Jan 29, 2024
2 parents af0dbeb + ccd1450 commit 0291a7a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
10 changes: 10 additions & 0 deletions bin/render.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
# to be executed from /data/CCBR_Pipeliner/Tools/spacesavers2/report
# Usage: bash bin/render_report_biowulf.sh
module load singularity
SINGULARITY_CACHEDIR=/data/CCBR_Pipeliner/SIFS

echo "cd /mnt && \
Rscript bin/render.R \
" |\
singularity exec -C -B $PWD:/mnt,/data/CCBR_Pipeliner/userdata/spacesavers2/:/mnt/data docker://nciccbr/spacesavers2:0.1.1 bash
12 changes: 6 additions & 6 deletions report.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ plot_metric_time <- function(dat, y_metric) {
labs(y = y_metric)
}
min_bytes_GiB <- 10
min_user_bytes_GiB <- 10
panel_summary <- function(dat,
folder_path = "/data/CCBR",
plot_fcn = plot_metric_time,
min_bytes_GiB = min_bytes_GiB) {
min_bytes_GiB = min_user_bytes_GiB) {
summary_dat_folder <- dat %>%
filter(FolderPath == folder_path) %>%
mutate(TotalBytes_GiB = from_bytes(TotalBytes, 'GiB')) %>%
Expand Down Expand Up @@ -298,7 +298,7 @@ layout_column_wrap(
p <- disk_usage %>%
mutate(datetime = lubridate::as_datetime(datetime)) %>%
rename(used = used_tib, size = size_tib, avail = avail_tib) %>%
pivot_longer(c(used, size, avail), names_to = 'metric') %>%
pivot_longer(c(used, size), names_to = 'metric') %>%
mutate(value = round(value, 2)) %>%
ggplot(aes(
x = datetime,
Expand All @@ -309,8 +309,8 @@ p <- disk_usage %>%
geom_line(alpha = 0.7) +
geom_point(aes(text = glue("{value} TiB"))) +
scale_x_datetime(labels = date_format("%b %Y")) +
scale_color_brewer(palette = "Set1",
breaks = c('size', 'used', 'avail') # enforce order
scale_color_brewer(palette = "Set2",
breaks = c('size', 'used') # enforce order
) +
labs(y = 'TiB', x = '') +
theme(legend.title = element_blank())
Expand All @@ -322,7 +322,7 @@ card(ggplotly(p, tooltip = "text"))
## Summary over time

Usage by top users for each spacesavers metric.
Only users with at least `r min_bytes_GiB` GiB of total disk usage are shown.
Only users with at least `r min_user_bytes_GiB` GiB of total disk usage are shown.

```{r summary_over_time}
summary_dat_all <- user_dat %>%
Expand Down

0 comments on commit 0291a7a

Please sign in to comment.