How to measure parfeval() execution time?

回答(1 个)

A parallel.Future instance has StartDateTime and FinishDateTime properties - you can subtract these to get an idea of the execution time. (I wouldn't count on this being terribly precise - it depends what you want the information for). For example
parpool('local', 1);
f = parfeval(@pause, 0, pi);
wait(f);
dur = f.FinishDateTime - f.StartDateTime
durSeconds = seconds(dur)

类别

帮助中心File Exchange 中查找有关 Calendar 的更多信息

产品

版本

R2018b

提问:

2018-11-21

回答:

2018-11-22

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by