Log all class and method usage in specific assembly

Memory profiling for .NET developers

Moderators: Luke Jefferson, StephenC, AndrewH, melvyn.harbour, james.billings, Laura Morley, dene.boulton

Log all class and method usage in specific assembly

Postby larbster » Tue Mar 19, 2013 7:24 pm

Hey - I have a large .net web app that uses a few legacy .net assemblies that I need to assess usage for. I cannot readily inject trace calls into the original assemblies and the calls are hidden various ways deep in database metadata that use reflection (so hard to route out exact usage with standard code coverage tools).

I'd need to run the a profiler for 2 weeks maybe to ensure that I catch all the calls since the app is pretty sprawling.

I guess I kind of need a run-time code coverage tool, but someone recommended speedtrace pro, which got me thinking about ANTS, since we are a red-gate shop.

Anyway, can ANTS be used in this context to give me a log of all method calls for a given set of assemblies in a .net web app?

thanks
larbster
 
Posts: 2
Joined: Wed Jun 23, 2010 12:52 pm

Postby james.billings » Wed Mar 20, 2013 8:29 pm

Hi, thanks for posting!

So in short, our profilers (both memory and performance) work at the process level. You cannot profile just one specific assembly in the sense you describe.

Once you've got your results though, you can use filters to narrow down what you're viewing- in your case, I guess filtering by objects that are in a specific class or namespace may work, assuming that assembly "a" contains a bunch of stuff all within a given namespace. To read about filtering, see here

Hope that helps, but do post back if you have further queries.
james.billings
 
Posts: 1146
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Postby larbster » Wed Apr 03, 2013 6:58 pm

Thanks. Sorry, I did not realize there was a response.

Makes a lot of sense. Is it feasible though to run one of your profilers for 2 weeks? If the app pool recycles and the Process ID changes, will the profiler stop?
Is one better than the other (memory vs perf) for this job?

Thanks!
larbster
 
Posts: 2
Joined: Wed Jun 23, 2010 12:52 pm

Postby james.billings » Wed Apr 03, 2013 7:02 pm

If the process being profiled stops, then the profiler will also stop I'm afraid- the tools aren't able to re-connect and carry on where they left off. As to which is the best tool of the two for your needs- it kind of depends on the problem you're trying to solve.
The memory profiler is geared towards finding memory leaks through the use of correctly timed snapshots in the area you think you may have a problem. It doesn't lead back to specific lines of code but shows objects and their chains of references.
The performance profiler will show you how long various methods take to execute and let you see where you may be able to make performance improvements; so they are really complimentary and designed for two different jobs.

Running either of them for a couple of weeks is unlikely to work very well- assuming the process stayed running, the performance profiler would gather so much data it would be hard / impossible to analyse effectively.
The Memory Profiler may stand more of a chance- if your process stays running, it'll only really gather information at the point you take a snapshot as opposed to continuously.
james.billings
 
Posts: 1146
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.


Return to ANTS Memory Profiler 7

Who is online

Users browsing this forum: No registered users and 0 guests