We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
@Compiler
1 parent 15e0deb commit 2634a66Copy full SHA for 2634a66
stdlib/Profile/test/runtests.jl
@@ -220,9 +220,19 @@ end
220
221
import InteractiveUtils
222
223
+@generated function compile_takes_1_second(x)
224
+ t = time_ns()
225
+ while time_ns() < t + 1e9
226
+ # busy wait for 1 second
227
+ end
228
+ return :(x)
229
+end
230
@testset "Module short names" begin
231
Profile.clear()
- @profile InteractiveUtils.peakflops()
232
+ @profile begin
233
+ @eval compile_takes_1_second(1) # to increase chance of profiling hitting compilation code
234
+ InteractiveUtils.peakflops()
235
236
io = IOBuffer()
237
ioc = IOContext(io, :displaysize=>(1000,1000))
238
Profile.print(ioc, C=true)
0 commit comments