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

Performance tests #3172

Closed
wants to merge 2 commits into from
Closed

Conversation

mrgriffin
Copy link
Collaborator

@mrgriffin mrgriffin commented Jul 24, 2023

Introduces BENCHMARK, struct Benchmark, and EXPECT_FASTER/EXPECT_SLOWER to compare the relative performance of two pieces of code. We can use this to test that replacement implementations of algorithms are indeed more efficient (in addition to using the existing mechanisms to check that they're equivalent).

Counts the time spent in the block in arbitrary time units (64-cycles
currently). If the block takes more than ~4 million cycles (~0.25s) the
benchmark will wrap around.

Note that the time can be affected by the timeout IRQs, and should only
be taken as a loose indication of relative performance.
@mrgriffin mrgriffin changed the base branch from master to upcoming July 24, 2023 14:34
@mrgriffin mrgriffin mentioned this pull request Jul 25, 2023
@mrgriffin mrgriffin marked this pull request as ready for review July 25, 2023 16:09
@mrgriffin
Copy link
Collaborator Author

Closing this, it can come via #3175.

@mrgriffin mrgriffin closed this Jul 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant