This is a static copy of a profile report

Home

SpreadsheetInputs>validateRange (Calls: 10, Time: 0.004 s)
Generated 04-Jun-2021 04:11:22 using performance time.
class method in file C:\Program Files\MATLAB\R2020b\toolbox\shared\io\general\+matlab\+io\+internal\+shared\SpreadsheetInputs.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
...eadsheetInputs.set.VariableNamesRangeclass method2
...t;SpreadsheetInputs.validateDataRangeclass method2
...t;SpreadsheetInputs.set.RowNamesRangeclass method2
...eadsheetInputs.set.VariableUnitsRangeclass method2
...tInputs.set.VariableDescriptionsRangeclass method2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
264
orientationValidator(propname,...
50.002 s55.4%
246
rhs = strtrim(rhs);
100.000 s10.0%
263
matlab.io.spreadsheet.internal...
50.000 s5.2%
245
if ischar(rhs)
100.000 s3.6%
265
end
50.000 s3.3%
All other lines  0.001 s22.6%
Totals  0.004 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
SpreadsheetInputs>SingleRecordNumVarsclass method20.001 s14.4%
SpreadsheetInputs>NumVarsclass method20.000 s13.7%
SpreadsheetInputs>SingleVariableclass method10.000 s9.9%
Self time (built-ins, overhead, etc.)  0.002 s62.0%
Totals  0.004 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function31
Non-code lines (comments, blank lines)5
Code lines (lines that can run)26
Code lines that did run17
Code lines that did not run9
Coverage (did run/can run)65.38 %
Function listing
time 
Calls 
 line
 243 
function rhs = validateRange(rhs,propname,orientationValidator,numElems)
< 0.001 
     10 
 244
rhs = convertStringsToChars(rhs); 
< 0.001 
     10 
 245
if ischar(rhs) 
< 0.001 
     10 
 246
    rhs = strtrim(rhs); 
< 0.001 
     10 
 247
end 
< 0.001 
     10 
 248
if isempty(rhs) 
< 0.001 
      5 
 249
    rhs = ''; 
< 0.001 
      5 
 250
    return; 
< 0.001 
      5 
 251
end 
< 0.001 
      5 
 252
try 
< 0.001 
      5 
 253
    if isscalar(rhs) && isnumeric(rhs) 
 254 
        % Scalar is supported, number of row/column
 255 
        if any(floor(rhs)~=rhs) || (rhs <= 0) || isinf(rhs)
 256 
            error(message('MATLAB:spreadsheet:importoptions:InvalidScalarLocation',propname));
 257 
        end
 258 
        % Convert to double
 259 
        rhs = double(rhs);
< 0.001 
      5 
 260
    else 
 261 
        % Either four element vector or range string.
< 0.001 
      5 
 262
        [type, rangesize] = ... 
      5 
 263
            matlab.io.spreadsheet.internal.validateRange(rhs); 
  0.002 
      5 
 264
        orientationValidator(propname,type,rangesize,numElems); 
< 0.001 
      5 
 265
    end 
 266 
catch ME
 267 
    if propname=="DataRange" && ismember(ME.identifier,{'MATLAB:spreadsheet:sheet:invalidRangeSpec',...
 268 
            'MATLAB:spreadsheet:sheet:rangeParseInvalid'})
 269 
        error(message('MATLAB:spreadsheet:importoptions:InvalidDataRange'));
 270 
    end
 271 
    throwAsCaller(ME)
< 0.001 
      5 
 272
end 
< 0.001 
      5 
 273
end 

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