You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to define benchmarks using @benchmark in a script file script.jl and run them via $ julia script.jl?
From the runtime of the Julia command, seems that the benchmarks are actually run, but theres nothing printed to my shell.
I second this. It'd be fantastic if there was a way of being able to get the wonderful visualisations of the REPL in an automated fashion with a script. I'm interested in tracking performance in my codebase and one-off benchmarks, while still useful, are far more limited than if I were to have scripts that could automate the process for me.
As far as I can tell @benchmark isn't responsible for doing any printing whatsoever, and it shouldn't be responsible for that either IMO. You get a pretty output in the REPL because the REPL implicitly calls show on result of the the last expression. To get that output from a script you can either use
display(@benchmarkfunction_to_be_benchmarked())
if you just want the output to go to whatever the default display is, or
Is there a way to define benchmarks using
@benchmark
in a script filescript.jl
and run them via$ julia script.jl
?From the runtime of the Julia command, seems that the benchmarks are actually run, but theres nothing printed to my shell.
The text was updated successfully, but these errors were encountered: