Programmatically Inserting Profiling Marks

I'm using the Profiler of Visual Studio 2008 Development Edition. To perform "targeted profiling," I can manually set profiler filters through "marks" anytime I am attached to my currently-running test code. But I would like to insert the marks programmatically instead. I would like to add a call, instruction, or directive to my test code that, when executed, tells the profiler "this is a 'mark' called 'BeginWork'" and "this is a 'mark' called 'EndWork'".

Is there a way to do that? If not, does Visual Studio 2010 have that ability?

10
задан Brent Arias 29 November 2010 в 23:42
поделиться