1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-12-26 02:30:29 +01:00

rudimentary @time replacement for logging

This commit is contained in:
kalmar 2017-03-15 17:49:39 +01:00
parent 8e9a7dcb15
commit 94389b887a

View File

@ -69,6 +69,15 @@ function κandA(name::String)
return κ, A return κ, A
end end
function timed_msg(t)
elapsed = t[2]
bytes_alloc = t[3]
gc_time = t[4]
gc_diff = t[5]
return "took: $elapsed s, allocated: $bytes_alloc bytes ($(gc_diff.poolalloc) allocations)."
end
function κandA(name::String, sdp_constraints, Δ::GroupAlgebraElement, solver::AbstractMathProgSolver; upper_bound=Inf) function κandA(name::String, sdp_constraints, Δ::GroupAlgebraElement, solver::AbstractMathProgSolver; upper_bound=Inf)
println("Creating SDP problem...") println("Creating SDP problem...")
@time SDP_problem = create_SDP_problem(sdp_constraints, Δ; upper_bound=upper_bound) @time SDP_problem = create_SDP_problem(sdp_constraints, Δ; upper_bound=upper_bound)