JuliaCI / JuliaCI/BenchmarkTools.jl
More copy-able result for `@benchmark`
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 684
- Forks
- 107
- PR merge metrics
- No merged PRs in 30d
Description
Sometimes users want to copy the result for comparison where @btime gives too little information but the current @benchmark is unfriendly for that.
One proposal is to change now:
julia> @benchmark sin(3)
BechmarkTools.Trial: 10000 samples with 1000 evaluations.
Range (min … max): 1.301 ns … 15.216 ns ┊ GC (min … max): 0.00% … 0.00%
Time (median): 1.384 ns ┊ GC (median): 0.00%
Time (mean ± σ): 1.456 ns ± 0.294 ns ┊ GC (mean ± σ): 0.00% ± 0.00%
█ ▅ ▂
▅▃▂▁▁▃█▆▃▂▂▄█▄▃▂▁▂▄▃▂▂▁▁▃▆▃▂▁▂▁▂▅▃▂▁▁▁▂▄▄▂▂▂▁▁▂▄▃▃▂▁▁▁▁▅█▄ ▃
1.3 ns Histogram: frequency by time 1.65 ns <
Memory estimate: 0 bytes, allocs estimate: 0.
to
julia> @benchmark sin(3)
BechmarkTools.Trial: 10000 samples with 1000 evaluations.
Range (min … max): 1.301 ns … 15.216 ns
Time (median): 1.384 ns
Time (mean ± σ): 1.456 ns ± 0.294 ns
-----------------------------------------
GC (min … max): 0.00% … 0.00%
GC (median): 0.00%
GC (mean ± σ): 0.00% ± 0.00%
█ ▅ ▂
▅▃▂▁▁▃█▆▃▂▂▄█▄▃▂▁▂▄▃▂▂▁▁▃▆▃▂▁▂▁▂▅▃▂▁▁▁▂▄▄▂▂▂▁▁▂▄▃▃▂▁▁▁▁▅█▄ ▃
1.3 ns Histogram: frequency by time 1.65 ns <
Memory estimate: 0 bytes, allocs estimate: 0.
so that people can copy the first 3-4 lines without sending really long, wrapped lines.
Besides I think it's much easier to navigate vertically anyway
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the @benchmark output and formatting entry point, then inspect any existing output-related tests. Compare the current layout with the proposed separated timing and GC sections. Done means the first lines are vertically arranged and copyable without long wrapped lines, while the histogram and other output remain available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- performance
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100