Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for existing benchmarking frameworks #5

Open
awadell1 opened this issue Aug 11, 2021 · 2 comments
Open

Add support for existing benchmarking frameworks #5

awadell1 opened this issue Aug 11, 2021 · 2 comments
Assignees
Labels
continuous-benchmarking Benchmarking Automation enhancement New feature or request

Comments

@awadell1
Copy link
Owner

PkgBenchmarks.jl uses a single benchmark/benchmarks.jl file defining SUITE::BenchmarkGroup

This is similar to the example in https://github.com/JuliaCI/BenchmarkTools.jl/blob/master/benchmark/benchmarks.jl.
But BenchmarkTools uses suite not SUITE

StaticArrays.jl uses PkgBenchmark's format but includes all benchmark/bench_*.jl files automatically (Yes, PkgJogger was inspired by this)

BaseBenchmarks.jl does not follow PkgBenchmark's format but does use SUITE

awadell1 added a commit that referenced this issue Sep 29, 2021
Can now have benchmarks in subfolders ie.
- benchmarks/
 - bench_foo.jl
 - bench_group/
   - bench_foo2.jl

  Reworked jogger suite() to use generated code and gensym names

  Fixes: #19, sets up option to define suite module in `BenchModule`
  for #5
awadell1 added a commit that referenced this issue Nov 3, 2021
Can now have benchmarks in subfolders ie.
- benchmarks/
 - bench_foo.jl
 - bench_group/
   - bench_foo2.jl

  Reworked jogger suite() to use generated code and gensym names

  Fixes: #19, sets up option to define suite module in `BenchModule`
  for #5
awadell1 added a commit that referenced this issue Nov 6, 2021
Can now have benchmarks in subfolders ie.
- benchmarks/
 - bench_foo.jl
 - bench_group/
   - bench_foo2.jl

  Reworked jogger suite() to use generated code and gensym names

  Fixes: #19, sets up option to define suite module in `BenchModule`
  for #5
@awadell1 awadell1 added the enhancement New feature or request label May 2, 2022
@awadell1 awadell1 added the continuous-benchmarking Benchmarking Automation label Jun 9, 2022
@awadell1 awadell1 self-assigned this Jun 22, 2022
@gdalle
Copy link

gdalle commented Mar 17, 2024

Hi!
Is there a reason why you chose not to rely on benchmark/benchmarks.jl? Even StaticArrays.jl does it that way, right? They just use that file to include every other benchmark/bench_*.jl

https://github.com/JuliaArrays/StaticArrays.jl/blob/07c12450d1b3481dda4b503564ae4a5cb4e27ce4/benchmark/benchmarks.jl#L1-L12

@awadell1
Copy link
Owner Author

Mainly, I'm lazy and wanted PkgJogger to handle the bundling up bench_*.jl files into a single suite for me. It also let's PkgJogger provide the following features:

  1. Support for a nested benchmarks/ folders. i.e. bechmark/bench_bar/bench_foo.jl will be added to the suite
  2. Revise support does a bit more than just including the bench_*.jl file, by bundling bench_*.jl files internally, revise can track changes at the file level, instead of the suite level.
  3. Each bench_*.jl is wrapped in a module ensuring each file gets it's own global namespace.

Plus PkgJogger still plays nice with the other packages, just put this in your benchmark/benchmarks.jl instead:

using PkgJogger
using AwesomePkg
@jog AwesomePkg
SUITE = JogAwesomePkg.suite()

Does that help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
continuous-benchmarking Benchmarking Automation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants