This is a static copy of a profile report

Home

ValidationHelper>GetCodedDimensions (Calls: 4, Time: 0.002 s)
Generated 18-May-2021 16:05:26 using performance time.
class method in file /usr/local/MATLAB/R2021a/toolbox/matlab/validators/+matlab/+internal/+validation/ValidationHelper.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
...>ValidationHelper.ValidationHelperclass method4
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
206
indices(i) = string(sz{i});
80.000 s23.1%
215
codedSize = eval(indices);
40.000 s19.2%
203
for i=1:numel(sz)
40.000 s9.6%
204
switch class(sz{i})
80.000 s7.7%
213
indices = insertAfter(indices,...
40.000 s7.6%
All other lines  0.001 s32.8%
Totals  0.002 s100% 
Children (called functions)
No children
Code Analyzer results
Line numberMessage
Coverage results
Show coverage for parent directory
Total lines in function24
Non-code lines (comments, blank lines)6
Code lines (lines that can run)18
Code lines that did run14
Code lines that did not run4
Coverage (did run/can run)77.78 %
Function listing
time 
Calls 
 line
 193 
function codedSize = GetCodedDimensions(sz)
 194 
% Returns a coded size vector from a cell array represent size.
 195 
% The returned value is suitable to check if an array's size matched the declared size.
 196 
% E.g. (2,:) => (2, -1)
< 0.001 
      4 
 197
    if isempty(sz) 
 198 
        codedSize = [];
 199 
        return;
< 0.001 
      4 
 200
    end 
 201 
    
< 0.001 
      4 
 202
    indices = ""; 
< 0.001 
      4 
 203
    for i=1:numel(sz) 
< 0.001 
      8 
 204
        switch class(sz{i}) 
< 0.001 
      8 
 205
          case 'uint64' 
< 0.001 
      8 
 206
            indices(i) = string(sz{i}); 
 207 
          case 'char'
 208 
            indices(i) = "-1";
< 0.001 
      8 
 209
        end 
< 0.001 
      8 
 210
    end 
 211 

< 0.001 
      4 
 212
    indices = join(indices, ','); 
< 0.001 
      4 
 213
    indices = insertAfter(indices,0,"["); 
< 0.001 
      4 
 214
    indices = append(indices,"]"); 
< 0.001 
      4 
 215
    codedSize = eval(indices); 
< 0.001 
      4 
 216
end 

Other subfunctions in this file are not included in this listing.