-
Notifications
You must be signed in to change notification settings - Fork 84
Closed
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior
Description
I may just be doing something silly, but these timings look off to me. I am using the CRAN version on Ubuntu 20.04 and R 4.1.2.
library(dplyr)
library(httr2)
get_throttled <- function(url, rate) {
message(Sys.time())
request(url) %>%
req_throttle(rate) %>%
req_method("get") %>%
req_perform()
}
urls <- rep("https://httpbin.org/status/200", 60)
system.time(x <- lapply(urls, get_throttled, rate = 1))
# user system elapsed
# 0.666 0.125 34.302
system.time(x <- lapply(urls, get_throttled, rate = 30/60))
# user system elapsed
# 0.826 0.199 64.362
system.time(x <- lapply(urls, get_throttled, rate = 10/60))
# user system elapsed
# 1.344 0.646 183.221
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior