Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ end
ntasks::Integer = Threads.nthreads(),
duration::Union{Real,Nothing} = nothing,
nrepeat::Integer = duration === nothing ? 2^15 : typemax(Int64),
delay::Real = 0, # not using 0.001 mentioned in Izraelevitz & Scott (2017)
nfills::Integer = 0,
ppush::Real = 0.5,
)
ntasks < 1 && error("require positive `ntasks`: got $ntasks")
local tasks
Expand All @@ -43,17 +46,18 @@ end
local npop = 0
for irepeat in 1:nrepeat
# ccall(:jl_breakpoint, Cvoid, (Any,), (; irepeat, itask))
if rand(Bool)
if rand() < ppush
push!(q, NOTPOTATO)
npush += 1
else
y = popfirst!(q)
npop += 1
if y == HOTPOTATO
# Since there are GC pauses, maybe there's no need
# to add sleep here.
# unfair_sleep(0.001)
# sleep(0.001)
for _ in 1:nfills
push!(q, NOTPOTATO)
end
unfair_sleep(delay)
# sleep(delay)
push!(q, y)
npush += 1
end
Expand Down
6 changes: 3 additions & 3 deletions benchmark/hotpotato/plot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ plt = @vlplot(
x = {:ntasks, title = "Number of Tasks"},
y = {:throughput, title = "Throughput [#OP/second]"},
color = :Implementation,
title = "Hot Potato Benchmark",
# title = "Hot Potato Benchmark",
data = datadf,
)

Expand All @@ -77,7 +77,7 @@ plt_speedup = @vlplot(
:point,
x = {:ntasks, title = "Number of Tasks"},
y = {:speedup, title = "Speedup [DLCRQ/Base]"},
title = "Hot Potato Benchmark (Speedup)",
# title = "Hot Potato Benchmark (Speedup)",
data = summarydf,
)

Expand All @@ -91,7 +91,7 @@ plt_trialid = @vlplot(
:trialid,
scale = {scheme = :magma},
},
title = "Hot Potato Benchmark",
# title = "",
data = datadf[datadf.impl .== :base, :],
)

Expand Down