Captures snapshot, i.e. writes collected profiling information to file.

If CPU profiling is being performed, it will not stop after the capture. To stop it, explicitly call StopCPUProfiling.

Namespace:  YourKit.Profiler.Api
Assembly:  YourKit.Profiler.Api (in YourKit.Profiler.Api.dll) Version: 4.5.6.556 (4.5.6.556)

Syntax

C#
public string CaptureSnapshot(
	bool withHeap
)
Visual Basic (Declaration)
Public Function CaptureSnapshot ( _
	withHeap As Boolean _
) As String
Visual C++
public:
String^ CaptureSnapshot(
	bool withHeap
)

Parameters

withHeap
Type: System..::.Boolean
Whether heap data should be stored.

Return Value

Absolute path to the captured snapshot. Note that if a remote application is profiled, the returned path will be in the file system of the remote host.

Exceptions

ExceptionCondition
System..::.Exception If capture failed. The possible reasons are:
  • profiled application has terminated
  • I/O failure

See Also