I was running in the environment I use for development. I started a clean session in a terminal. This got rid of gtk, but didn’t change the insensitivity of the counts to changes in delay. It also didn’t change an apparent top-level count of 1.
julia> for (id, m) in Base.loaded_modules; println(m); end
Markdown
Dates
Random
Sockets
Printf
Logging
REPL
SHA
Base
Future
UUIDs
FileWatching
Serialization
Mmap
Statistics
Core
Pkg
Unicode
Main
LibGit2
__PackagePrecompilationStatementModule
SharedArrays
InteractiveUtils
Test
CRC32c
Base64
Profile
DelimitedFiles
SuiteSparse
Libdl
SparseArrays
LinearAlgebra
Distributed
julia> using Profile
julia> Profile.init(delay=0.001)
julia> @profile sleep(1)
julia> Profile.clear()
julia> @profile sleep(1)
julia> Profile.print()
1 .\client.jl:464; _start()
1 .\client.jl:312; exec_options(::Base.JLOptions)
1 .\client.jl:374; run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool)
1 .\essentials.jl:789; invokelatest
1 .\essentials.jl:790; #invokelatest#1
1 .\client.jl:390; (::getfield(Base, Symbol("##737#739")){Bool,Bool,Bool,Boo...
1 ...e\julia\stdlib\v1.2\REPL\src\REPL.jl:201; run_repl(::REPL.AbstractREPL, ::Any)
1 ...\julia\stdlib\v1.2\REPL\src\REPL.jl:1038; run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef)
1 ...ia\stdlib\v1.2\REPL\src\LineEdit.jl:2306; run_interface(::REPL.Terminals.TextTerminal, ::REPL.Li...
1 .\essentials.jl:789; invokelatest
1 .\essentials.jl:790; #invokelatest#1
1 ...julia\stdlib\v1.2\REPL\src\REPL.jl:722; (::getfield(REPL, Symbol("#do_respond#38")){Bool,getf...
1 ...\stdlib\v1.2\REPL\src\LineEdit.jl:2246; transition
1 ...\stdlib\v1.2\REPL\src\LineEdit.jl:2243; transition(::Function, ::REPL.LineEdit.MIState, ::Any)
1 ...\stdlib\v1.2\REPL\src\LineEdit.jl:2222; commit_changes(::REPL.Terminals.UnixTerminal, ::Any)
1 .\io.jl:545; write(::REPL.Terminals.TTYTerminal, ::Array{UInt8,1})
1 .\io.jl:522; macro expansion
1 .\io.jl:238; unsafe_write(::REPL.Terminals.TTYTerminal, ::Ptr{...
1 .\stream.jl:931; unsafe_write(::Base.TTY, ::Ptr{UInt8}, ::UInt64)
1 .\stream.jl:877; uv_write(::Base.TTY, ::Ptr{UInt8}, ::UInt64)
1 .\stream.jl:907; uv_write_async(::Base.TTY, ::Ptr{UInt8}, ::UInt6...
337 .\task.jl:268; (::getfield(REPL, Symbol("##26#27")){REPL.REPLBackend})()
337 ...re\julia\stdlib\v1.2\REPL\src\REPL.jl:118; macro expansion
337 ...re\julia\stdlib\v1.2\REPL\src\REPL.jl:86; eval_user_input(::Any, ::REPL.REPLBackend)
337 .\boot.jl:330; eval(::Module, ::Any)
337 .\asyncevent.jl:188; sleep(::Int64)
337 .\asyncevent.jl:116; wait(::Timer)
337 .\stream.jl:47; stream_wait(::Timer, ::Base.GenericCondition{Base.Threa...
337 .\condition.jl:104; wait(::Base.GenericCondition{Base.Threads.SpinLock})
337 .\task.jl:591; wait()
337 .\task.jl:564; poptaskref(::Base.InvasiveLinkedListSynchronized{Task})
julia> Profile.init(delay=0.1)
julia> Profile.clear()
julia> @profile sleep(1)
julia> Profile.print()
1 .\client.jl:464; _start()
1 .\client.jl:312; exec_options(::Base.JLOptions)
1 .\client.jl:374; run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool)
1 .\essentials.jl:789; invokelatest
1 .\essentials.jl:790; #invokelatest#1
1 .\client.jl:390; (::getfield(Base, Symbol("##737#739")){Bool,Bool,Bool,Boo...
1 ...e\julia\stdlib\v1.2\REPL\src\REPL.jl:201; run_repl(::REPL.AbstractREPL, ::Any)
1 ...\julia\stdlib\v1.2\REPL\src\REPL.jl:1038; run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef)
1 ...ia\stdlib\v1.2\REPL\src\LineEdit.jl:2301; run_interface(::REPL.Terminals.TextTerminal, ::REPL.Li...
1 ...ia\stdlib\v1.2\REPL\src\LineEdit.jl:2390; prompt!(::REPL.Terminals.TextTerminal, ::REPL.LineEdit...
1 ...a\stdlib\v1.2\REPL\src\LineEdit.jl:1342; match_input(::Dict, ::Any)
1 ...a\stdlib\v1.2\REPL\src\LineEdit.jl:1342; match_input(::Dict, ::Any, ::Any, ::Any, ::Any)
1 .\io.jl:290; eof(::REPL.Terminals.TTYTerminal)
1 .\stream.jl:61; eof(::Base.TTY)
1 .\stream.jl:376; wait_readnb(::Base.TTY, ::Int64)
1 .\condition.jl:104; wait(::Base.GenericCondition{Base.Threads.SpinLock})
1 .\task.jl:591; wait()
1 .\task.jl:564; poptaskref(::Base.InvasiveLinkedListSynchronized{...
337 .\task.jl:268; (::getfield(REPL, Symbol("##26#27")){REPL.REPLBackend})()
337 ...re\julia\stdlib\v1.2\REPL\src\REPL.jl:118; macro expansion
337 ...re\julia\stdlib\v1.2\REPL\src\REPL.jl:86; eval_user_input(::Any, ::REPL.REPLBackend)
337 .\boot.jl:330; eval(::Module, ::Any)
337 .\asyncevent.jl:188; sleep(::Int64)
337 .\asyncevent.jl:116; wait(::Timer)
337 .\stream.jl:47; stream_wait(::Timer, ::Base.GenericCondition{Base.Threa...
337 .\condition.jl:104; wait(::Base.GenericCondition{Base.Threads.SpinLock})
337 .\task.jl:591; wait()
337 .\task.jl:564; poptaskref(::Base.InvasiveLinkedListSynchronized{Task})
By the way, 337 counts a second seems about right for the profiles that prompted my initial post, with a count of around 44k in ~130 seconds.