aboutsummaryrefslogtreecommitdiff
path: root/artifacts/2022-09-23-s3lat/plot.R
blob: dd904e6a3a8b187569e816cd186227ce40b7cc9e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
library(tidyverse)

read_csv("garage-v0.7.csv") %>% add_column(daemon="garage 0.7.3") -> a
read_csv("garage-v0.8.csv") %>% add_column(daemon="garage 0.8.0 beta") -> b
read_csv("minio-20220917.csv") %>% add_column(daemon="minio RELEASE.2022-09-17") -> c
bind_rows(a,b,c) %>% group_by(daemon,endpoint) %>% summarise(
  time_mean = mean(nanoseconds) / 1000 / 1000,
  time_max = max(nanoseconds) / 1000 / 1000,
  time_min = min(nanoseconds) / 1000 / 1000
) -> c

st <- "100 measurements, 5 nodes, 50ms RTT + 10ms jitter between nodes\nno contention: latency is due to intra-cluster communications\ncolored bar = mean latency, error bar = min and max latency"


ggplot(c, aes(x=endpoint,y=time_mean,fill=daemon,ymin=time_min,ymax=time_max)) +
      geom_bar(stat="identity", position=position_dodge(),color="black") +
      geom_errorbar(position=position_dodge(.9),width=.2) +
      scale_y_continuous(expand=c(0,0))+
      coord_flip() +
      labs(
        x="S3 Endpoint",
        y="Latency (ms)",
        fill="Daemon",
        caption="Get the code to reproduce this graph at https://git.deuxfleurs.fr/Deuxfleurs/mknet",
        title="S3 endpoint latency in a simulated geo-distributed cluster",
        subtitle=st) +
      theme_classic() +
      theme(legend.position = c(.8, .3))

ggsave("./plot.png", width=200, height=110, units="mm")