Skip to content

Commit

Permalink
Add run script for benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
dahong67 committed Nov 4, 2023
1 parent 1648671 commit 7ef1057
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
4 changes: 3 additions & 1 deletion benchmark/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
tune.json
tune.json
results.json
report.md
21 changes: 21 additions & 0 deletions benchmark/run.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Select which benchmark suites to run
const SELECTED_SUITES = nothing # set to `nothing` to run all suites
# const SELECTED_SUITES = ["mttkrp"]

# Load packages
import Pkg
Pkg.activate(@__DIR__)
using GCPDecompositions, PkgBenchmark

# Run benchmarks and save results
results =
isnothing(SELECTED_SUITES) ? benchmarkpkg(GCPDecompositions) :
benchmarkpkg(
GCPDecompositions,
BenchmarkConfig(; env = Dict("GCP_BENCHMARK_SUITES" => join(SELECTED_SUITES, ' '))),
)
writeresults(joinpath(@__DIR__, "results.json"), results)

# Generate report and save
report = sprint(export_markdown, results)
write(joinpath(@__DIR__, "report.md"), report)

0 comments on commit 7ef1057

Please sign in to comment.