Skip to content

Commit

Permalink
Add stress test example
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Jun 21, 2018
1 parent 908c9c4 commit 81184ad
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@
^httpbin.md$
^examples$
^release.R$
bugs
19 changes: 19 additions & 0 deletions bugs/multi-stress.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Random segfaults for curl 0.60 + openssl + nghttp2

library(curl)
pool <- new_pool()
tlds <- Filter(function(x){nchar(x) < 3}, urltools::tld_dataset)


while(TRUE){
server <- paste0('https://www.google.', sample(tlds, 1))
cat("Adding: ", server, "\n")
for(i in 1:100){
curl::curl_fetch_multi(server, pool = pool)
}
cat("Running...\n")
print(multi_run(pool = pool))
cat("GC: ")
gc()
cat("OK!\n")
}

0 comments on commit 81184ad

Please sign in to comment.