0

I have profiled my app in ReSharper and I have one really slow method:

Profiler screenshot.

Is there any way I can get a list of arguments passed to that function? I tried line by line profiling but no dice. Is there a way I can insert a trace message that will show up in the profiler with the parameters.

Justin Dearing
  • 14,270
  • 22
  • 88
  • 161
  • 1
    Run it under the IDE. Hit the pause button a few times, and each time examine the call stack. Probability is 49.42% that you will see that routine on the stack, and you can see what the arguments are. That's [*this method*](http://stackoverflow.com/a/378024/23771). – Mike Dunlavey Jan 17 '13 at 21:37
  • @MikeDunlavey thats hacky but you have a point. – Justin Dearing Jan 17 '13 at 21:56
  • SO has a lot of questions of the form: "I'm using such-and-so chrome-plated tool, but it's not really helping me." It's because the CS business is wedged on this particular issue. It's like asking "I just paid big $ for a really fancy car, but it still won't get me across the pond." Here the fallacy is that measurements find performance problems. They don't. They may *indicate* them, but they don't *find* them. – Mike Dunlavey Jan 18 '13 at 18:32
  • @MikeDunlavey I'm asking if I can use this tool (which by the way I got on the cheap as a result of a sale) can output a particular, and easily obtainable parameter. That would give me more data to help troubleshoot the issue. I could get that data in other ways, like inserting a trace message in that subroutine. I also realize that getting such data would be an expensive operation. – Justin Dearing Jan 18 '13 at 20:11
  • Since there are 133 calls to that routine, the argument values could be different in each call, so the UI cannot show them to you because it hasn't recorded them. So your idea of inserting a trace on that routine might be the only way. – Mike Dunlavey Jan 19 '13 at 17:03

1 Answers1

2

You need the combination of a profiler and tracer, a tool like SpeedTrace Pro (Perfinity) or Dynatrace (Compuware) which provides the requested functionality to resolve data related performance problems, e.g. http://speedtracepro.com/product/features/analytic_components