Skip to content
Draft
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
31 changes: 16 additions & 15 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,23 @@ jobs:
steps:
- uses: actions/checkout@v5
- name: Set up Julia
uses: julia-actions/setup-julia@v2
uses: ./.github/actions/setup-julia
with:
version: '1'
- uses: julia-actions/cache@v2
# - name: Install ReLint.jl
# run: julia -e 'using Pkg; Pkg.add(url="https://github.com/RelationalAI-oss/ReLint.jl")'
# - name: Run ReLint
# run: |
# julia -e '
# using ReLint
# lint_result = ReLint.run_lint(".")
# if lint_result.fatalviolations_count > 0
# println("ReLint found fatal violations")
# exit(1)
# end
# '
julia-version: '1'
project-file: 'Project.toml'
key-suffix: relint
- name: Install ReLint.jl
run: julia -e 'using Pkg; Pkg.add(url="https://github.com/RelationalAI-oss/ReLint.jl")'
- name: Run ReLint
run: |
julia -e '
using ReLint
lint_result = ReLint.run_lint(".")
if lint_result.fatalviolations_count > 0
println("ReLint found $(lint_result.fatalviolations_count) fatal violations")
exit(1)
end
'

- uses: julia-actions/julia-format@v4
with:
Expand Down
10 changes: 6 additions & 4 deletions benchmark/util/compare.jl
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ function table_to_html(data::Vector{CompareRow})::String
html = "<p>✅ Benchmarks are stable!</p>" * "\n" * html
else
if regressed > 0
html = "<p>⚠️ $regressed benchmark regressions detected!</p>" * "\n" * html
html = "<p>⚠️ $(regressed) benchmark regressions detected!</p>" * "\n" * html
end
if improved > 0
html = "<p>🚀 $improved benchmark improvements detected!</p>" * "\n" * html
html = "<p>🚀 $(improved) benchmark improvements detected!</p>" * "\n" * html
end
end

Expand Down Expand Up @@ -178,6 +178,8 @@ function compare_multi_tables(a::Vector{Vector{Row}}, b::Vector{Vector{Row}})::V
return data
end

thaskey(dict::Dict, key) = haskey(dict, key)

function compare_tables(a::Vector{Row}, b::Vector{Row})::Vector{CompareRow}
dict_a = Dict(@sprintf("%s %07d", x.name, x.n) => x for x in a)
dict_b = Dict(@sprintf("%s %07d", x.name, x.n) => x for x in b)
Expand All @@ -195,13 +197,13 @@ function compare_tables(a::Vector{Row}, b::Vector{Row})::Vector{CompareRow}

for bench in keys_vec
row = CompareRow()
if haskey(dict_a, bench)
if thaskey(dict_a, bench)
r = dict_a[bench]
row.name = r.name
row.n = r.n
row.time_ns_a = r.time_ns
end
if haskey(dict_b, bench)
if thaskey(dict_b, bench)
r = dict_b[bench]
row.name = r.name
row.n = r.n
Expand Down
Loading