Main Content

results

Retrieve results from parallel pool activity monitor

Since R2025a

    Description

    monitorResults = results(monitor) retrieves the pool activity monitoring results from the ActivityMonitor object monitor.

    • If the ActivityMonitor object is still collecting activity monitoring data, results retrieves the activity monitoring results collected so far.

    • If the ActivityMonitor object is not monitoring pool activity, results retrieves all collected monitoring data.

    example

    Examples

    collapse all

    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;
    Starting parallel pool (parpool) using the 'Processes' profile ...
    Connected to parallel pool with 6 workers.
    

    Submit multiple parfeval computations to compute magic squares. Wait for all tasks to complete.

    f(1:100) = parallel.Future;
    for idx = 1:100
        f(idx) = parfeval(@magic,1,idx);
    end
    wait(f);

    Use the results function to obtain the monitoring results. Visualize the monitoring results in the Pool Dashboard.

    monitoringResults = results(monitor);
    parpoolDashboard(monitoringResults)

    Input Arguments

    collapse all

    Pool activity monitor, specified as an ActivityMonitor object.

    Example: monitor = parallel.pool.ActivityMonitor

    Output Arguments

    collapse all

    Pool activity monitoring results, returned as an ActivityMonitorResults object. To visualize the pool activity monitoring results in the Pool Dashboard, use the parpoolDashboard function.

    Version History

    Introduced in R2025a