library(tidyverse) options(width=120) FINGERPRINTS <- c( "2B280B23E1107BB62ABFC40DDCC8824814F80A72" = "snowflake-01", "8838024498816A039FCBBAB14E6F40A0843051FA" = "snowflake-02" ) x <- read_csv("times.csv") for (fingerprint in names(FINGERPRINTS)) { cat("\n") cat("\n") cat(FINGERPRINTS[[fingerprint]], "\n"); xx <- filter(x, fingerprint == !!fingerprint) xx_connected <- filter(xx, resolution == "connected") cat("\n") cat("Distribution of poll outcomes:") print(table(xx$resolution)) cat("\n") cat("Time to get answer from broker:\n") print(summary(as.numeric(xx$answer_ts - xx$poll_ts))) cat("\n") cat("Time to get answer from broker (successful only):\n") print(summary(as.numeric(xx_connected$answer_ts - xx_connected$poll_ts))) cat("\n") cat("Total time to connection:\n") print(summary(as.numeric(xx_connected$resolved_ts - xx_connected$run_ts))) }