Skip to content

Commit ffdaff7

Browse files
authored
Use grouped bar plots for PkgBenchmark stats (#8)
1 parent a2e9ce6 commit ffdaff7

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
1515
PkgBenchmark = "32113eaa-f34f-5b0d-bd6c-c81e245fc73d"
1616
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
1717
SolverBenchmark = "581a75fa-a23a-52d0-a590-d6201de2218a"
18+
StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd"
1819

1920
[compat]
2021
BenchmarkTools = "1.3"
@@ -28,6 +29,7 @@ Pkg = "1.9"
2829
PkgBenchmark = "0.2"
2930
Plots = "1.39"
3031
SolverBenchmark = "0.5,0.6"
32+
StatsPlots = "0.15"
3133
julia = "^1.6"
3234

3335
[extras]

src/JSOBenchmarks.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ using JLD2
1212
using JSON
1313
using PkgBenchmark
1414
using Plots
15+
using StatsPlots
1516

1617
# JSO modules
1718
using SolverBenchmark
@@ -113,13 +114,13 @@ function run_benchmarks(
113114
property == :name && continue
114115
commit_values = this_commit_k[!, property]
115116
reference_values = reference_k[!, property]
116-
plot(
117+
groupedbar(
117118
names,
118-
[commit_values, reference_values],
119+
[commit_values reference_values],
119120
title = string(property),
120121
label = ["commit" "reference"],
121-
linewidth = 2,
122-
xticks = (1:length(names), names),
122+
bar_width = 0.7,
123+
bar_position = :dodge,
123124
xrotation = 45,
124125
tickfontsize = 4,
125126
)

0 commit comments

Comments
 (0)