Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running profiler on a background agent

My background agent is hitting the 6MB memory limit, and I'd like to understand what objects are being allocated.

In principle I can do this using the Visual Studio Windows Phone Performance Analysis tool, however I don't see how I can run this on a background agent, only on the main app.

Anyone know how to run the Visual Studio Windows Phone Performance Analysis tool on a background agent?

like image 368
Damian Avatar asked Jan 25 '12 11:01

Damian


People also ask

How do I run a profiler?

Click Start, point to Programs, click Microsoft SQL Server 20xx (your version), click Performance Tools, and then click SQL Server Profiler.

Can you schedule SQL Profiler trace?

You can specify a trace stop time if you use Transact-SQL stored procedures or if you use SQL Server Profiler.


1 Answers

If you are just trying to get the background agent to run while you are profiling you can use ScheduledActionService.LaunchForTest like in this question. And here it is noted that it can still take a while before the agent runs.

If you want to test just the background agent outside of the rest of the app I haven't seen a good way to do it. However I would make a make an empty app and have it manually run the background agent functionality. Then you can profile that and it should work well enough.

Additionally here are some links about keeping your memory consumption down in background agents that you might find helpful:

Wp7.5 Mango–Background Agents - Chris Sainty (of gReadie fame)

Optimizing memory consumption for WP7 Background Agents - Oliver Weichhold

like image 71
Austin Thompson Avatar answered Jan 03 '23 20:01

Austin Thompson