This is a static copy of a profile report

Home

validateVariableNameLength (Calls: 1601, Time: 0.004 s)
Generated 04-Jun-2021 04:11:16 using performance time.
function in file C:\Program Files\MATLAB\R2020b\toolbox\matlab\datatypes\tabular\+matlab\+internal\+tabular\validateVariableNameLength.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
varNamesDim>varNamesDim.makeValidNameclass method1584
...>metaDim.fixLabelsForCompatibilityclass method3
metaDim>metaDim.checkAgainstVarLabelsclass method14
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
8
nameLengths = strlength(names)...
16010.001 s30.8%
19
end
16010.000 s7.3%
15
elseif all(nameLengths > 0)
16010.000 s6.9%
9
tooLong = (nameLengths > na...
16010.000 s2.4%
10
if any(tooLong)
16010.000 s2.3%
All other lines  0.002 s50.4%
Totals  0.004 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function19
Non-code lines (comments, blank lines)8
Code lines (lines that can run)11
Code lines that did run5
Code lines that did not run6
Coverage (did run/can run)45.45 %
Function listing
time 
Calls 
 line
   1 
function tooLong = validateVariableNameLength(names,tooLongErrorID)
   2 
%VALIDATEVARIABLENAMELENGTH checks that variable names do not exceed namelengthmax.
   3 
%   This function takes a cell array of variable names and errors if any are longer
   4 
%   than namelengthmax.
   5 

   6 
%   Copyright 2018-2019 The MathWorks, Inc.
   7 

  0.001 
   1601 
   8
nameLengths = strlength(names); 
< 0.001 
   1601 
   9
tooLong = (nameLengths > namelengthmax); 
< 0.001 
   1601 
  10
if any(tooLong) 
  11 
    TooLongNames = names(tooLong);
  12 
    if nargout == 0
  13 
        error(message(tooLongErrorID, TooLongNames{1}))
  14 
    end
< 0.001 
   1601 
  15
elseif all(nameLengths > 0) 
  16 
    % good names
  17 
else % 0-length or NaN. 
  18 
    error(message('MATLAB:table:ZeroLengthVarname')) % Not hit by metaDim
< 0.001 
   1601 
  19
end 

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