Get Average Running Duration from PCT Batch Jobs
조회 수: 1 (최근 30일)
이전 댓글 표시
Using the job monitor I can right click on an individual job and select show details to get the Running Duration. I would like to average the running duration over all 300,000+ jobs I am running as well as compute the failed to finished ratio.
Right now I'm using
batch(@function,1,{param1,param2});
To start the jobs
What's the best way to aggregate information about my jobs?
댓글 수: 0
채택된 답변
Edric Ellis
2018년 1월 26일
Here's how you can use the information stored in the jobs to get a running duration in seconds for each job that has a valid StartDateTime and FinishDateTime:
% Choose a cluster object. Here, I'm using the 'local' cluster
c = parcluster('local');
% Get start and finish datetimes as cell arrays
fdtc = {c.Jobs.FinishDateTime};
sdtc = {c.Jobs.StartDateTime};
% Work out which have valid start and finish times
ok = cellfun(@(x,y) ~isempty(x) && ~isempty(y), fdtc, sdtc);
% Create datetime arrays from the cell arrays
fdt = vertcat(fdtc{ok});
sdt = vertcat(sdtc{ok});
% Get the running duration by subtracting start from finish.
runDuration = seconds(fdt - sdt)
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Gaussian Process Regression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!