Skip to content

Commit

Permalink
Tests for Profile.init() and callers error (#30711)
Browse files Browse the repository at this point in the history
  • Loading branch information
kshyatt authored and fredrikekre committed Jan 16, 2019
1 parent 0bb0332 commit f10cf03
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions stdlib/Profile/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ let iobuf = IOBuffer()
@test isempty(Profile.fetch())
@test Profile.callers("\\") !== nothing
@test Profile.callers(\) !== nothing
# linerange with no filename provided should fail
@test_throws ArgumentError Profile.callers(\; linerange=10:50)
end

# issue #13229
Expand All @@ -60,3 +62,15 @@ global z = 0
end
@test z == 10
end

@testset "setting sample count and delay in init" begin
n_, delay_ = Profile.init()
@test n_ == 1_000_000
def_delay = Sys.iswindows() ? 0.01 : 0.001
@test delay_ == def_delay
Profile.init(n=1_000_001, delay=0.0005)
n_, delay_ = Profile.init()
@test n_ == 1_000_001
@test delay_ == 0.0005
Profile.init(n=1_000_000, delay=def_delay)
end

2 comments on commit f10cf03

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan

Please sign in to comment.