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

Note new file name in benchmark docs #2030

Merged
merged 2 commits into from
Aug 15, 2024
Merged
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
10 changes: 8 additions & 2 deletions docs/src/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ For example, the following steps were used to benchmark the changes introduced i
```julia
julia> using BenchmarkTools, Revise; using Trixi

julia> trixi_include("examples/2d/elixir_euler_sedov_blast_wave.jl")
julia> # nowadays "examples/tree_2d_dgsem/elixir_euler_sedov_blast_wave.jl"
trixi_include("examples/2d/elixir_euler_sedov_blast_wave.jl")
Comment on lines +45 to +46
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering if we should use the new filename in the trixi_include?
But since the rest of the code assumes that the reader checked specific Git SHAs out,
this is more like a blog and not living documentation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that was my intention - today, we would also get some different results due to later changes.


julia> du_test = copy(sol.u[end]); u_test = copy(sol.u[end]);

Expand All @@ -65,7 +66,8 @@ For example, the following steps were used to benchmark the changes introduced i

shell> git checkout 222241ff54f8a4ca9876cc1fc25ae262416a4ea0

julia> trixi_include("examples/2d/elixir_euler_sedov_blast_wave.jl")
julia> # nowadays "examples/tree_2d_dgsem/elixir_euler_sedov_blast_wave.jl"
trixi_include("examples/2d/elixir_euler_sedov_blast_wave.jl")

julia> @benchmark Trixi.rhs!(
$(du_test),
Expand All @@ -85,6 +87,10 @@ For example, the following steps were used to benchmark the changes introduced i
evals/sample: 1
```
Run the `@benchmark ...` commands multiple times to see whether there are any significant fluctuations.
Note that the elixir name has changed since
[PR #256](https://github.com/trixi-framework/Trixi.jl/pull/256).
Nowadays, the relevant elixir is
[`examples/tree_2d_dgsem/elixir_euler_sedov_blast_wave.jl`](https://github.com/trixi-framework/Trixi.jl/blob/main/examples/tree_2d_dgsem/elixir_euler_sedov_blast_wave.jl).

Follow these steps for both commits you want to compare. The relevant benchmark results you should typically be looking at
are the median and mean values of the runtime and the memory/allocs estimate. In this example, the differences
Expand Down
Loading