Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
- Posts: 6
- Joined: Wed Jul 11, 2012 1:48 pm
For a detailed analysis in the stand alone tool I need to saving a profiling session that is created in 2 different sessions.
Code: Select all
using (var savedSession = app.LoadSession(PathToPrimarySnapshot))
var saveHeaders = savedSession.SessionFile.GetSnapshotHeaders();
using (var activeSession = app.CreateSession(GetStartInfo()))
var activeHeaders = activeSession.SessionFile.GetSnapshotHeaders();
var comparison = activeSession.Comparison;
var snapShotSaveSelections = new
new SnapShotSaveSelection(saveHeaders, "primary", true),
new SnapShotSaveSelection(activeHeaders, "comparison", true)
var path = Path.Combine(WorkPath, _testCase + ".prfsession");
activeSession.Save(path, snapShotSaveSelections, true, comparison);
Depending on which session the save method is called either the primary or the comparison snapshot will only be saved. Is there a possibility to save the combined session?
Thanks in advanced!
- Posts: 1029
- Joined: Wed Mar 02, 2005 7:53 pm
No, it is not possible to save a session that contains snapshots from two different sessions. The snapshots provided to the Save method should all belong to the session on which Save is called.
However, you can compare snapshots from two different sessions (as you have done). The compared type information will then contain delta information between the two snapshots. You can also compare two snapshots in the user interface. For more information, see the online documentation
. The functionality to compare snapshots from two sessions is currently a bit limited, and the user interface is a bit awkward. This is something we will improve in a future version of the profiler.
SciTech Software AB
Users browsing this forum: No registered users and 26 guests