开发者

Looking for a continuous integration profiler (C#)

开发者 https://www.devze.com 2022-12-20 03:29 出处:网络
I would like to perfom automatic profiling on my code during my continuous integration. I know tools like dottrace that allow to profile my code, but what I woul开发者_开发百科d like is a tool that e

I would like to perfom automatic profiling on my code during my continuous integration.

I know tools like dottrace that allow to profile my code, but what I woul开发者_开发百科d like is a tool that each night makes profiling and send me a report then I can know which code needs to be improved.


From this is seems that ANTS Profiler can do that:

ANTS Profiler can profile a unit test. The method for doing this is to set ANTS Profiler to profile a .NET desktop application, then choose the path to NUnit-gui.exe. Once ANTS Profiler starts NUnit for you, you can load your test assembly and run your unit test. During the unit test, you can take snapshots from ANTS Profiler, and profiling will stop when NUnit's window is closed.

It would also be possible to profile the console version on NUnit in the same fashion. In addition to choosing nunit-console.exe as the application to profile, specify the name of the assembly to load and the appropriate options in the Arguments box.


While this answer sounds like a critique of Anton's answer, it's really a critique of your question.

The citation in Anton's answer says "yes, you can profile unit tests". In the same way that a debugger can debug unit tests. It does NOT say "and you can automatically dump it to disk and compare it to a previous run using this commandline option". All it says is "there is no reason why the thing you're profiling cannot be your DLL sitting inside a test runner - we don't just profile EXEs you wrote you know"

Even if there were settings to run from commandline and capture, what would you do with it? Are there tools that come with it that let you say "and complain if this falls outside of this tolerance" that can then act like a failing test and come out in the build report?

You dont use a profiler for stuff like this, you do normal performance tests with timings as a normal unit test would.

0

精彩评论

暂无评论...
验证码 换一张
取 消