r-universe-org / help

Support and bug tracker for R-universe
https://docs.r-universe.dev/
8 stars 2 forks source link

speed test #117

Open jeroen opened 2 years ago

jeroen commented 2 years ago

Some quick tests. Maybe performance depends on IPv4 vs IPv6 ??

test <- function(url){
  h <- curl::new_handle(noprogress=FALSE)
  curl::curl_fetch_memory(url, handle = h)
}

req1 <- test('https://r-universe.dev/speed')
req2 <- test('https://ropensci.r-universe.dev/speed')
req3 <- test('https://ropensci.r-universe.dev/bin/macosx/contrib/4.1/magick_2.7.3.9000.tgz')
req4 <- test('https://ropensci.r-universe.dev/stats/checks')

cat("req1: ", length(req1$content) / req1$times[['total']] / 1e6, "MB/s\n")
cat("req2: ", length(req2$content) / req2$times[['total']] / 1e6, "MB/s\n")
cat("req3: ", length(req3$content) / req3$times[['total']] / 1e6, "MB/s\n")
cat("req4: ", length(req4$content) / req4$times[['total']] / 1e6, "MB/s\n")