Possible to delete snapshots via API?

I can create snapshots with the dotMemory.Check() method.

In addition to the ability to give names to snapshots ( there is already an issue for that: https://youtrack.jetbrains.com/issue/PROF-301 ), it would be great to provide a method that allows deleting certain snapshots.

Is this possible? If not, might it be possible in newer versions?

 

Best regards,

Lukas

4 comments
Official comment

Hi Lukas,
could you explain the case why do you need to delete snapshots in details please?

I would like to write a test that calls a function n times and measures the memory consumption for each call. In some circumstances (e.g. if memory consumption grows continuously) I would like to save the first and the last snapshot, but not all n snapshots. The reason for that might for example be that my n was chosen quite big and I don't want to waste too much disk space.
Does this sound reasonable?

Best regards,
Lukas

0

Hi,
thanks for the explanation

Sounds very reasonable, but there is one issue. All snapshots in-between the first and the last are needed to compare them, to determine new, dead, and survived objects. That the reason why there is no possibility to delete a snapshot from the workspace in standalone dotMemory and no such possibility in dotMemory Unit.
May be we should add a possibility to save a subsequence of snapshots as a separate workspace, that will solve a problem with disk usage.

0

Hi Ed,

Thanks a lot for your fast reply. Jetbrains support is awesome!

Thank you for your explanation and for thinking about other ways to handle snapshots.

Best regards,
Lukas

0

Please sign in to leave a comment.