I am trying to profile my specific code using dot memory api. When I call the dump() method my expectation is to take snapshot and save it to dir.
I am trying to take two snapshot here one before executing my code and after executing my code by calling dump() method.
Is it possible to create the both snapshot in the same output file as we option to do it from Stand alone dot memory?
Appreciate your suggestion. following is the code snippet
SelfAttach.Attach(new SaveSnapshotProfilingConfig
{
ProfilingControlKind = ProfilingControlKind.Api,
SaveDir = "D:\\SelfProfiling",
RedistDir = "D:\\Softwares\\JetBrains.Profiler.SelfSdk.2017.2.2",
ProfilingType = ProfilingType.Memory,
ListFile = "D:\\snapshot_list.xml"
});
while (SelfAttach.State != SelfApiState.Active)
{
Thread.Sleep(250); // wait until API starts
}
if (MemoryProfiler.IsActive)
{
MemoryProfiler.Dump();
MyMethodTobeProfiled();
MemoryProfiler.Dump();
}
if (MemoryProfiler.CanDetach)
MemoryProfiler.Detach();
A snapshot is normally a bunch of files.
.dmw
is an archive of a snapshot. This is the design now. The reason is to ability to start sending a snapshot immediately to a remote host. This is the R# requirement.