MstxMonitor.set_buffer_size

Function

def set_buffer_size(cls, size: int) -> MsptiResult:

Function Description

Sets the size of the activity buffer before profiling starts to store the profile data.

During the profiling, the dynamic modification of the activity buffer size does not take effect. The modification takes effect only after the current profiling is complete and the next profiling starts.

Input

size: Size of the activity buffer, in MB. The default value is 8 MB.

The value must be a positive integer. If the value is invalid, a failure message is returned and the default activity buffer size is used.

Return Value

MsptiResult.MSPTI_SUCCESS indicates a successful operation, while MsptiResult.MSPTI_ERROR_INVALID_PARAMETER indicates a failure caused by incorrect parameter setting.