ActivityMonitorResults - Results from monitoring pool activity - MATLAB (original) (raw)
Main Content
Results from monitoring pool activity
Since R2025a
Description
An ActivityMonitorResults
object contains the results from collecting pool activity monitoring data using a ActivityMonitor object. The ActivityMonitor
object monitors and collects data on worker activity in a parallel pool.
Monitoring data includes:
- The type of parallel construct, such as
parfor
,parfeval
, andspmd
. - The amount of data (in bytes) the client and workers send and receive.
- The time each worker spends evaluating their portion of the parallel constructs.
You can retrieve the monitoring results using the results
function and view the monitoring results data in the Pool Dashboard.
Creation
You can create an ActivityMonitorResults
object in one of these ways:
- Use either the
results
orstop
function on anActivityMonitor
object to retrieve pool monitoring results. - Save pool monitoring data collected using the Pool Dashboard.
Properties
This property is read-only.
Pool monitoring start time, represented as a datetime
scalar.
Example: 18-Oct-2024 13:28:35
Data Types: datetime
This property is read-only.
Pool monitoring stop time, represented as a datetime
scalar.
Example: 18-Oct-2024 16:00:05
Data Types: datetime
Examples
Create an ActivityMonitor
object to start collecting pool monitoring data. With default settings, parallel.pool.ActivityMonitor
automatically starts an interactive parallel pool using the default profile if one does not exist.
monitor = parallel.pool.ActivityMonitor;
Create some large data on the client, then build a Constant
object, C
, transferring the data to the pool.
data = rand(1000); C = parallel.pool.Constant(data);
Run multiple parfor
-loops accessing the data. For efficiency, preallocate the results array.
x = eye(5); for ii = 1:5 parfor jj = 1:20 x(ii,jj) = C.Value(ii,jj); end end
Stop the activity monitor and retrieve the ActivityMonitorResults
object that contains the monitoring results collected during the execution of the parfor
-loops.
monitoringResults = stop(monitor);
Visualize the monitoring results in the Pool Dashboard.
parpoolDashboard(monitoringResults)
Version History
Introduced in R2025a