Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
julia 0.6
BenchmarkTools 0.2.0
BenchmarkTools 0.3.0
GitHub 3.0.0
JSON
HTTP
Expand Down
24 changes: 14 additions & 10 deletions src/jobs/BenchmarkJob.jl
Original file line number Diff line number Diff line change
Expand Up @@ -543,13 +543,13 @@ function printreport(io::IO, job::BenchmarkJob, results)
that indicate possible regressions or improvements - are shown below (thus, an empty table means that all
benchmark results remained invariant between builds).

| ID | time ratio | memory ratio |
|----|------------|--------------|
| ID | real-time ratio | cpu-time ratio | memory ratio |
|----|-----------------|----------------|--------------|
""")
else
print(io, """
| ID | time | GC time | memory | allocations |
|----|------|---------|--------|-------------|
| ID | real-time | cpu-time | GC time | memory | allocations |
|----|-----------|----------|---------|--------|-------------|
""")
end

Expand Down Expand Up @@ -615,23 +615,27 @@ resultrow(ids, t::BenchmarkTools.Trial) = resultrow(ids, minimum(t))
function resultrow(ids, t::BenchmarkTools.TrialEstimate)
t_tol = intpercent(BenchmarkTools.params(t).time_tolerance)
m_tol = intpercent(BenchmarkTools.params(t).memory_tolerance)
timestr = string(BenchmarkTools.prettytime(BenchmarkTools.time(t)), " (", t_tol, ")")
realtimestr = string(BenchmarkTools.prettytime(BenchmarkTools.realtime(t)), " (", t_tol, ")")
cputimestr = string(BenchmarkTools.prettytime(BenchmarkTools.cputime(t)), " (", t_tol, ")")
memstr = string(BenchmarkTools.prettymemory(BenchmarkTools.memory(t)), " (", m_tol, ")")
gcstr = BenchmarkTools.prettytime(BenchmarkTools.gctime(t))
allocstr = string(BenchmarkTools.allocs(t))
return "| `$(idrepr(ids))` | $(timestr) | $(gcstr) | $(memstr) | $(allocstr) |"
return "| `$(idrepr(ids))` | $(realtimestr) | $(cputimestr) | $(gcstr) | $(memstr) | $(allocstr) |"
end

function resultrow(ids, t::BenchmarkTools.TrialJudgement)
t_tol = intpercent(BenchmarkTools.params(t).time_tolerance)
m_tol = intpercent(BenchmarkTools.params(t).memory_tolerance)
t_ratio = @sprintf("%.2f", BenchmarkTools.time(BenchmarkTools.ratio(t)))
rt_ratio = @sprintf("%.2f", BenchmarkTools.realtime(BenchmarkTools.ratio(t)))
ct_ratio = @sprintf("%.2f", BenchmarkTools.cputime(BenchmarkTools.ratio(t)))
m_ratio = @sprintf("%.2f", BenchmarkTools.memory(BenchmarkTools.ratio(t)))
t_mark = resultmark(BenchmarkTools.time(t))
rt_mark = resultmark(BenchmarkTools.realtime(t))
ct_mark = resultmark(BenchmarkTools.cputime(t))
m_mark = resultmark(BenchmarkTools.memory(t))
timestr = "$(t_ratio) ($(t_tol)) $(t_mark)"
realtimestr = "$(rt_ratio) ($(rt_tol)) $(rt_mark)"
cputimestr = "$(ct_ratio) ($(ct_tol)) $(ct_mark)"
memstr = "$(m_ratio) ($(m_tol)) $(m_mark)"
return "| `$(idrepr(ids))` | $(timestr) | $(memstr) |"
return "| `$(idrepr(ids))` | $(realtimestr) | $(cputimestr) | $(memstr) |"
end

resultmark(sym::Symbol) = sym == :regression ? REGRESS_MARK : (sym == :improvement ? IMPROVE_MARK : "")