Skip to content

Commit

Permalink
Merge branch 'master' into sd/speedup-applytheme
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrumbiegel authored Oct 31, 2024
2 parents a1eb25c + f5528a6 commit fca1e78
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions metrics/ttfp/run-benchmark.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,16 @@ base_branch = length(ARGS) > 2 ? ARGS[3] : "master"

function run_benchmarks(projects; n=n_samples)
benchmark_file = joinpath(@__DIR__, "benchmark-ttfp.jl")
# go A, B, A, B, A, etc.
for project in repeat(projects, n)
# go A, A, B, B, A, A, B, B, etc. because if A or B have some effect on their
# subsequent run, then we distribute those more evenly. If we used A, B, A, B then
# B would always influence A and A always B which might bias the results (something
# that can carry over separate processes like thermal throttling or so)

A, B = projects
As = Iterators.partition(fill(A, n), 2)
Bs = Iterators.partition(fill(B, n), 2)

for project in Iterators.flatten(Iterators.flatten(zip(As, Bs)))
println(basename(project))
run(`$(Base.julia_cmd()) --startup-file=no --project=$(project) $benchmark_file $Package`)
end
Expand Down

0 comments on commit fca1e78

Please sign in to comment.