| Author |
Message |
springy
Joined: 04 Feb 2011 Posts: 12
|
Posted: Thu Feb 10, 2011 6:52 pm Post subject: create and bookmark regions from code? |
|
|
Hello,
does there exist something similar to
| Code: |
| RedGate.MemoryProfiler.Snapshot.TakeSnapshot() |
for the Performance Profiler?
I would prefer an IDisposable pattern which records the region-end on dispose:
| Code: |
using( RedGate.PerformanceProfiler.Regions.StartRegion("name of region") )
{
// some lengthy code
} |
|
|
| Back to top |
|
 |
Chris.Allen
Joined: 12 Mar 2009 Posts: 443
|
Posted: Fri Feb 11, 2011 3:14 pm Post subject: |
|
|
No. Sorry.
The profiler doesn't have a snapshot model. It has a "time-line" model where you profile all of your application and if you need to filter out specific times, you can click and drag on the time line.
So, two things that might help you are "user events"- this is a way of 'synchronizing' your code to the time line. Please check the out here:
http://www.red-gate.com/supportcenter/Content?c=knowledgebase\ANTS_Performance_Profiler\KB200811000319.htm&p=ANTS%20Performance%20Profiler
(its not restricted to ASP.NET).
Secondly, as far as automation of a profiling session goes, we have the command-line version called profiler.exe. Deatils here:
http://www.red-gate.com/supportcenter/Content?c=ANTS_Performance_Profiler\help\6.2\app_commandline.htm&p=ANTS%20Performance%20Profiler |
|
| Back to top |
|
 |
springy
Joined: 04 Feb 2011 Posts: 12
|
Posted: Sat Feb 12, 2011 2:39 pm Post subject: Re: |
|
|
| Chris.Allen wrote: |
| The profiler doesn't have a snapshot model. It has a "time-line" model where you profile all of your application and if you need to filter out specific times, you can click and drag on the time line. |
Yeah, and I can created pinned+named regions out of the selection -- and that's exactly what I wanted to pregenerate automatically from within the profiled application; just the same way as I can create snapshots when profiling memory.
| Chris.Allen wrote: |
So, two things that might help you are "user events"- this is a way of 'synchronizing' your code to the time line. Please check the out here:
http://www.red-gate.com/supportcenter/Content?c=knowledgebase\ANTS_Performance_Profiler\KB200811000319.htm&p=ANTS%20Performance%20Profiler
(its not restricted to ASP.NET). |
I'll give it a try.
But one thought so far:
The doc says
| Quote: |
| "provided there were no concurrent accesses to this page or background threads" |
:
Since the profiler already has the possibility to filter by a specific thread, why not capture the thread which triggered the user-event (or the creation of a pinned region). |
|
| Back to top |
|
 |
AndrewH
Joined: 17 Aug 2006 Posts: 137
|
Posted: Mon Feb 14, 2011 12:43 pm Post subject: Re: |
|
|
| springy wrote: |
Since the profiler already has the possibility to filter by a specific thread, why not capture the thread which triggered the user-event (or the creation of a pinned region). |
There's certainly some room for improvement in this regard, but there is a way to achieve what you want in ANTS 6. If you select a small region around the the user event, you can click the event to select the method that it occurred in.
The time the method was executing will appear as a green bar in the timeline: you can now click this to select the entire time that that particular method was executing - additionally, the tooltip for the bar will tell you which thread it was running in. You can also switch to the call graph to analyse only the time spent in that particular method. _________________ Andrew Hunter
Software Developer
Red Gate Software Ltd. |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group