dotMemory 2016.1 Help

Getting Snapshots by Condition

Sometimes, you may be interested in taking snapshots only when a certain condition takes place. The most popular case is taking a snapshot when the memory consumption of your application is dramatically increased. As doing this manually (using the Get Snapshot button) is quite tricky, dotMemory allows you to automate this process. All you need is to set a particular condition and snapshots will be collected automatically after the condition takes place. Currently, the following conditions are supported:

  • Memory consumption increase in MB.
  • Memory consumption increase in %.
  • Period of time in min (periodical taking of snapshots).

To enable collecting snapshots by condition:

  1. After the profiling session is started, click the Get Snapshot by Condition button in profiling controls.
  2. Select desired conditions in the Automatically get a snapshot section and specify particular values for them:
    • if memory consumption increases by [X] MB - automatically get a snapshot when memory consumption* exceeds the baseline by X MB. The first baseline is a memory consumption on the moment when you click the Start button in the Get Snapshot by Condition window. After the condition takes place, dotMemory gets a snapshot and the memory consumption in that moment becomes a new baseline.
    • if memory consumption increases by [X] % - automatically get a snapshot when memory consumption exceeds the baseline by X percent. The first baseline is a memory consumption on the moment when you click the Start button in the Get Snapshot by Condition window. After the condition takes place, dotMemory gets a snapshot and the memory consumption in that moment becomes a new baseline.
    • every [X] minutes - automatically get a snapshot every X minutes.
  3. Turn on the Limit the max number of snapshots to [X] checkbox if you want dotMemory to take no more than X snapshots. This option can be useful if you are limited on the disk space.
  4. Click Start.

To disable collecting snapshots by condition:

  1. Click the Get Snapshot by Condition button in profiling controls.
  2. Click Stop.
Last modified: 19 August 2016