I am currently trying to compare a performance of two codes. For this purpose, I decided to choose BenchmarkTools. However, I cannot fully understand how to obtain necessary information in Juno. Consider the example from the manual:
I believe that, for instance, the array times should correspond to the times in all samples. But where can I find the mean time, minimum time, etc? I tried to open every directory in this BenchmarkTools.Trial, but no. Neither had I found information about this in package’s documentation. What should I do?
The various estimates are not stored in BenchmarkTools.Trial, but are rather calculated on the fly as part of the type’s show method.
Documentation on how to compute these estimates can be found in the BenchmarkTools manual as well as in the API reference; long story short, you can just call mean(::Trial), median(::Trial), etc.
I think Juno just displays the internal fields like you see here if there isn’t a dedicated render method for that type of object. However, if I am not mistaken, this has been changed on the master version of Juno.
Julia moves fast. Last month’s packages are very different. For the time being (pre-1.0), I would update early and often. And most of the time when you encounter an error / depwarn, the answer is probably to update the package first (and then if that doesn’t fix it, you can checkout master. Or else… bingo you found it first! (is that a good thing?)).
@benchmarkreturns the result, it doesn’t display it. So either try display(@benchmark sin(1)) or run that block in the REPL or, as your already noted, with inline evaluation.