How to measure parfeval() execution time?

9 ビュー (過去 30 日間)
JAI PRAKASH
JAI PRAKASH 2018 年 11 月 21 日
回答済み: Edric Ellis 2018 年 11 月 22 日
Is there any way to find how much time parfeval() to complete its execution?

回答 (1 件)

Edric Ellis
Edric Ellis 2018 年 11 月 22 日
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)

カテゴリ

Help Center および File ExchangeAsynchronous Parallel Programming についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by