Skip to content

Commit

Permalink
Merge pull request #32 from CLeARoboticsLab/dfridovi/speeding-up-benc…
Browse files Browse the repository at this point in the history
…hmark

Minor benchmark additions
  • Loading branch information
dfridovi authored Jan 2, 2025
2 parents 257c794 + 36d9f4f commit 37bea57
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions benchmark/path.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function benchmark(;
sparsity_rate = 0.9,
ip_mcp = nothing,
path_mcp = nothing,
ip_kwargs = (;),
ip_kwargs = (; tol = 1e-6),
)
rng = Random.MersenneTwister(1)

Expand Down Expand Up @@ -126,7 +126,8 @@ function benchmark(;
elapsed_time = @elapsed sol = MixedComplementarityProblems.solve(
MixedComplementarityProblems.InteriorPoint(),
ip_mcp,
θ,
θ;
ip_kwargs...
)

(; elapsed_time, success = sol.status == :solved)
Expand All @@ -149,7 +150,10 @@ function summary_statistics(data)
(; success_rate = fraction_solved(solver_data), runtime_stats(solver_data)...)
end

(; ip = accumulate_stats(data.ip_data), path = accumulate_stats(data.path_data))
stats = (; ip = accumulate_stats(data.ip_data), path = accumulate_stats(data.path_data))
@info "IP runtime is $(100(stats.ip.μ / stats.path.μ)) % that of PATH."

stats
end

"Estimate mean and standard deviation of runtimes for all problems."
Expand Down

0 comments on commit 37bea57

Please sign in to comment.