better reporting of timings in tests

This commit is contained in:
Marek Kaluba 2022-04-02 15:53:55 +02:00
parent 4431ae7144
commit de600de0a2
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15
4 changed files with 35 additions and 18 deletions

View File

@ -121,15 +121,22 @@ using Groups.KnuthBendix
u = (a6 * a5)^-1 * b1 * (a6 * a5)
x = (a6 * a5 * a4 * a3 * a2 * u * a1^-1 * a2^-1 * a3^-1 * a4^-1) # yet another auxillary
# x = (a4^-1*a3^-1*a2^-1*a1^-1*u*a2*a3*a4*a5*a6)
@time evaluate(x)
b3 = x * a0 * x^-1
b3im = @time evaluate(b3)
b3cim = @time let g = b3
b3im = evaluate(b3)
b3cim = let g = b3
f = Groups.compiled(g)
f(Groups.domain(g))
end
@test b3im == b3cim
@test a0 * b2 * b1 == a1 * a3 * a5 * b3
@time evaluate(x)
let g = b3
f = Groups.compiled(g)
f(Groups.domain(g))
@time f(Groups.domain(g))
end
end
end

View File

@ -2,7 +2,6 @@ using BenchmarkTools
using Test
using Groups
using Groups.New
function wl_ball(F; radius::Integer)
g, state = iterate(F)
@ -47,7 +46,7 @@ end
@testset "iteration: SAut(F_n)" begin
R = 4
FN = FreeGroup(N)
SAutFN = New.SpecialAutomorphismGroup(FN)
SAutFN = SpecialAutomorphismGroup(FN)
let G = SAutFN
S = unique([gens(G); inv.(gens(G))])

View File

@ -37,6 +37,8 @@
@test k == a*b^-1
@time k = test_iteration(F3, 1000)
@time test_iteration(F3, 1000)
@test k == (a^2)*c^2*a^-1
end
@ -67,5 +69,4 @@
test_Group_interface(F3)
test_GroupElement_interface(rand(F3, 2)...)
end
end

View File

@ -11,20 +11,30 @@ include(joinpath(pathof(GroupsCore), "..", "..", "test", "conformance_test.jl"))
@testset "Groups" begin
include("free_groups.jl")
include("fp_groups.jl")
_, t = @timed include("free_groups.jl")
@info "free_groups.jl took $(round(t, digits=2))s"
_, t = @timed include("fp_groups.jl")
@info "fp_groups.jl took $(round(t, digits=2))s"
include("matrix_groups.jl")
include("AutFn.jl")
_, t = @timed include("matrix_groups.jl")
@info "matrix_groups.jl took $(round(t, digits=2))s"
_, t = @timed include("AutFn.jl")
@info "AutFn.jl took $(round(t, digits=2))s"
include("homomorphisms.jl")
_, t = @timed include("homomorphisms.jl")
@info "homomorphisms.jl took $(round(t, digits=2))s"
include("AutSigma_41.jl")
include("AutSigma3.jl")
if haskey(ENV, "CI")
_, t = @timed include("AutSigma_41.jl")
@info "AutSigma_41 took $(round(t, digits=2))s"
_, t = @timed include("AutSigma3.jl")
@info "AutSigma3 took $(round(t, digits=2))s"
end
include("group_constructions.jl")
# if !haskey(ENV, "CI")
# include("benchmarks.jl")
# end
_, t = @timed include("group_constructions.jl")
@info "Constructions took $(round(t, digits=2))s"
end
if !haskey(ENV, "CI")
include("benchmarks.jl")
end