This is a static copy of a profile report

Home

ValidationHelper>ValidationHelper.validateSize (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
validateDataTypefunction4
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
78
if matlab.lang.internal.isMatc...
40.002 s76.3%
72
if isempty(H.CodedSize)
40.000 s8.3%
77
sz = H.CodedSize;
40.000 s7.6%
79
return;
40.000 s3.9%
71
ex = [];
40.000 s1.2%
All other lines  0.000 s2.6%
Totals  0.002 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
isMatchingSizefunction40.001 s54.8%
Self time (built-ins, overhead, etc.)  0.001 s45.2%
Totals  0.002 s100% 
Code Analyzer results
Line numberMessage
Coverage results
Show coverage for parent directory
Total lines in function27
Non-code lines (comments, blank lines)2
Code lines (lines that can run)25
Code lines that did run7
Code lines that did not run18
Coverage (did run/can run)28.00 %
Function listing
time 
Calls 
 line
  70 
        function [value, ex] = validateSize(H, value)
< 0.001 
      4 
  71
            ex = []; 
< 0.001 
      4 
  72
            if isempty(H.CodedSize) 
  73 
                return;
< 0.001 
      4 
  74
            end 
  75 

< 0.001 
      4 
  76
            try 
< 0.001 
      4 
  77
                sz = H.CodedSize; 
  0.002 
      4 
  78
                if matlab.lang.internal.isMatchingSize(size(value), sz) 
< 0.001 
      4 
  79
                    return; 
  80 
                elseif hasZeroOrUnfixedDimension(sz) && isequal(size(value),[0,0])
  81 
                    indices = char(GetDimensions(sz));
  82 
                    if isa(value, 'function_handle')
  83 
                        eval(['value=' 'function_handle.empty(' indices ');']);
  84 
                    else
  85 
                        eval(['value=' 'reshape(value,' indices ');']);
  86 
                    end
  87 
                else
  88 
                    indices = char(GetSubscripts(sz));
  89 
                    eval(['temp' indices '=value;']);
  90 
                    value = temp;
  91 
                end
  92 
            catch me
  93 
                msgString = matlab.internal.validation.Exception.getSizeSpecificMessage(me,GetSizeStruct(sz));
  94 
                ex = MException('MATLAB:validation:IncompatibleSize', msgString);
  95 
            end
  96 
        end

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