Skip to content

Add benchmarking tool - #16

Open
bruno-f-cruz wants to merge 19 commits into
mainfrom
feature-add-benchmarking-tool
Open

Add benchmarking tool#16
bruno-f-cruz wants to merge 19 commits into
mainfrom
feature-add-benchmarking-tool

Conversation

@bruno-f-cruz

Copy link
Copy Markdown
Member

This PR adds a new tool to run hardware tests of Harp devices against the Harp protocol specification.

The main features:

  • Integrates with the toolkit using the benchmark command: dotnet run --project Harp.Toolkit benchmark --port COM3 --report here.html
  • Takes as single required input the port of the device to test
  • Outputs output to the console using ANSI (also supports verbose mode to render all test results via a --verbose flag)
  • Using RazorLight templates, can also render the results to a html file that can be used to exchange results

@bruno-f-cruz

Copy link
Copy Markdown
Member Author

@glopesdev was this the integration you had in mind for new tools?
Mostly ok with it. Just a few questions:

  • Should we create new namespaces to not clutter the top level one (e.g.: Harp.Toolkit.Benchmark) or leave everything as Harp.Tookit
  • Are you ok with adding these two extra dependencies? (RazorLight and Ansi support)

@glopesdev

Copy link
Copy Markdown
Contributor

Should we create new namespaces to not clutter the top level one (e.g.: Harp.Toolkit.Benchmark) or leave everything as Harp.Tookit

@bruno-f-cruz Happy to create a namespace for particularly complex commands requiring many helper classes.

An alternative is to create a separate library for the command backend and then add it as a dependency (e.g. I am going to do this with the reflex generator).

Are you ok with adding these two extra dependencies? (RazorLight and Ansi support)

In principle not opposed to any dependencies, since this will be a self-contained dotnet tool, so it will be deployed and run completely independent from any bonsai project dependency, etc.

But let's discuss the details on the benchmarks and reflex generator PRs.

@bruno-f-cruz

Copy link
Copy Markdown
Member Author

Sounds good. I guess the best way to go about this is to expose a single method (e.g.: https://github.com/harp-tech/Harp.Benchmark/blob/bb0529326aee7a12ab9b33d2dfeec573f8bbd2ac/src/Harp.Benchmark/Program.cs#L43) as the entry point of the tool and create a single command subclass in this repository that wraps it?

@bruno-f-cruz
bruno-f-cruz marked this pull request as ready for review May 7, 2026 23:23
@bruno-f-cruz
bruno-f-cruz requested a review from glopesdev May 7, 2026 23:23
@bruno-f-cruz

Copy link
Copy Markdown
Member Author

@glopesdev took a first stab at this that would benefit from initial comments. Feel free to run the tool against a device; it should output something sensible. We can discuss some edge cases during one of the upcoming harp meetings

@glopesdev
glopesdev force-pushed the feature-add-benchmarking-tool branch from de4629c to 327dcb4 Compare July 30, 2026 19:45
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.

2 participants