Skip to content

Benchmark helper function for docs - #282

Draft
quffaro wants to merge 2 commits into
mainfrom
cm/benchmarks-in-docs
Draft

Benchmark helper function for docs#282
quffaro wants to merge 2 commits into
mainfrom
cm/benchmarks-in-docs

Conversation

@quffaro

@quffaro quffaro commented Nov 22, 2024

Copy link
Copy Markdown
Member

Need to get Cahn-Hilliard working.

Comment thread docs/src/benchmarks.md
@@ -0,0 +1,17 @@
# Benchmarks

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Committed the results rather than stub

Comment thread docs/make.jl
"Benchmarks" => "benchmarks.md"
#"ASCII Operators" => "ascii.md",
#"Canonical Models" => "canon.md",
#"Library Reference" => "api.md"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

you can use draft mode in Documenter to disable running specific pages.

Comment thread docs/benchmark_helper.jl
end
end
end
end

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

tabwidth!

Comment thread docs/benchmark_helper.jl
ks = keys(benchmark_data);
open(file, "r+") do f
foreach(readlines(file)) do line
stub = filter(u -> startswith(line, "<!-- BENCHMARK:$u -->"), ks);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can't you use a regex to parse out the u instead of looping over the keys(benchmark_data) to do this in O(1) time instead of O(n)?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

regex is something like <!-- BENCHMARK:\([A-z]*\)\w+-->

@lukem12345 lukem12345 changed the title first pass at benchmarks. need post-processing, formatting, dynamism.… Benchmark helper function for docs Mar 14, 2025
@lukem12345 lukem12345 added the documentation Improvements or additions to documentation label Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants