Issues running BenchmarkDotNet fron NUnit test
I am trying to have BenchmarkDotNet run a Benchmark when running (NUnit) tests for one of my services.
However the Benchmark fails with 'Build Error'.
My whole project has no trouble building and running, so i don't understand what its issue is...
I have included the testlog, for anybody who wish to look through that...
My test that runs the Benchmark is the following.
2 Replies
From the testlog, it does not appear that my ´ExcludeAssembliesFilter ´ does the expected action of excluding my Uno Platform project from the code generated by BenchmarkDotNet. I highly suspect it is the inclusion of Uno Platform in the code generated by BenchmarkDotNet that is messing it up...
As i have no previous experience using BenchmarkDotNet, i have used Copilot to generate most of the code for this benchmarking, so it might also have some faults because of that...
The
AppliedKeywordServiceBenchmarks
class can be view in full here: https://github.com/NoergaardMikkelsen/gaio/blob/benchmark/Statistics.Tests/Services/Benchmark/AppliedKeywordServiceBenchmarks.csGitHub
gaio/Statistics.Tests/Services/Benchmark/AppliedKeywordServiceBench...
Program to register questions to be asked to AI's and responses logged - NoergaardMikkelsen/gaio
... Fixed... One of my test was targeting a class in my Uno Platform project. Now that i have removed that test, and the project reference the benchmark works.