Skip to content

Commit

Permalink
minor changes to log msg
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmaykm committed Sep 27, 2024
1 parent 5b0d3a1 commit 840e339
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -402,20 +402,27 @@ include("setup.jl")
json = download_json("$get_url?id=$id", downloader = downloader)
@test get(json["args"], "id", nothing) == ["$id"]
end


thread_count=Base.Threads.nthreads()
@info("starting concurrent requests test",
get_url=get_url,
post_url=post_url,
thread_count=thread_count,
)
# thread_options = (thread_count > 1 ? (false, true) : (true,))
thread_options = (false, true)

for downloader in (nothing, mine)
have_lsof = Sys.which("lsof") !== nothing
count_tcp() = Base.count(x->contains("TCP",x), split(read(`lsof -p $(getpid())`, String), '\n'))
if have_lsof
n_tcp = count_tcp()
end
for method in (:get, :post)
for use_threads in (false, true)
for use_threads in thread_options
@info("concurrent requests test",
is_default_downloader=(downloader === nothing),
method=method,
get_url=get_url,
thread_count=Base.Threads.nthreads(),
use_threads=use_threads,
)
t = @elapsed @sync for id = 1:count
Expand Down

0 comments on commit 840e339

Please sign in to comment.