This is a static copy of a profile report

Home

rowNamesDim>rowNamesDim.makeValidName (Calls: 8, Time: 0.002 s)
Generated 04-Jun-2021 04:11:15 using performance time.
class method in file C:\Program Files\MATLAB\R2020b\toolbox\matlab\datatypes\tabular\+matlab\+internal\+tabular\+private\rowNamesDim.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
ReadTable>ReadTable.buildTableFromDataclass method1
...t;rowNamesDim.validateAndAssignLabelsclass method7
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
229
conflicted = checkReservedName...
10.001 s53.8%
225
checkReservedNames(names);
70.000 s17.5%
222
if modException == "error"
80.000 s13.3%
226
modified = false(size(names));
70.000 s6.8%
245
end
80.000 s0.2%
All other lines  0.000 s8.4%
Totals  0.002 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
...Dim>rowNamesDim.checkReservedNamesclass method80.001 s47.3%
Self time (built-ins, overhead, etc.)  0.001 s52.7%
Totals  0.002 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function34
Non-code lines (comments, blank lines)11
Code lines (lines that can run)23
Code lines that did run15
Code lines that did not run8
Coverage (did run/can run)65.22 %
Function listing
time 
Calls 
 line
 212 
        function [validNames, modified] = makeValidName(names, modException)
 213 
            %MAKEVALIDNAME Construct valid table row names. The only row
 214 
            %   not allowed is ':' to avoid ambiguous subscripting.
 215 
            %
 216 
            %   MODEXCEPTION controls warning or error response when NAMES
 217 
            %   contains invalid names. Valid values for MODEXCEPTION are
 218 
            %   'silent' and 'error'.
 219 
            import matlab.internal.datatypes.warningWithoutTrace;
 220 
            import matlab.internal.tabular.private.rowNamesDim.checkReservedNames;
 221 

< 0.001 
      8 
 222
            if modException == "error" 
< 0.001 
      7 
 223
                validNames = names; % return the originals, or possibly error 
< 0.001 
      7 
 224
                if ischar(names), names = { names }; end % unusual case, not optimized 
< 0.001 
      7 
 225
                checkReservedNames(names); 
< 0.001 
      7 
 226
                modified = false(size(names)); 
      1 
 227
            else % make names valid 
< 0.001 
      1 
 228
                validNames = names; 
  0.001 
      1 
 229
                conflicted = checkReservedNames(names); 
< 0.001 
      1 
 230
                if any(conflicted) 
 231 
                    validNames(conflicted) = matlab.lang.makeUniqueStrings(validNames(conflicted), validNames,namelengthmax);
< 0.001 
      1 
 232
                end 
      1 
 233
                modified = conflicted; 
< 0.001 
      1 
 234
                if any(modified) 
 235 
                    switch modException % error or warn per level specified
 236 
                        case 'silent'
 237 
                            % Only used by readtable
 238 
                        case 'warn' % Only used by loadobj
 239 
                            warningWithoutTrace(message('MATLAB:table:RowNameReservedBackCompat'));
 240 
                        otherwise
 241 
                            assert(false);
 242 
                    end
      1 
 243
                end 
< 0.001 
      8 
 244
            end 
< 0.001 
      8 
 245
        end 

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