This is a static copy of a profile report

Home

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

Parents (calling functions)

Function NameFunction TypeCalls
metaDim>metaDim.validateAndAssignLabelsclass method3
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
292
wasReserved = matlab.internal....
30.001 s69.4%
290
matlab.internal.tabular.valida...
30.000 s16.4%
297
end
30.000 s0.1%
293
if any(wasReserved)
30.000 s0.0%
296
end
30.000 s0.0%
All other lines  0.000 s14.0%
Totals  0.001 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
metaDim>metaDim.checkReservedNamesclass method30.000 s40.5%
validateVariableNameLengthfunction30.000 s1.3%
Self time (built-ins, overhead, etc.)  0.001 s58.3%
Totals  0.001 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function20
Non-code lines (comments, blank lines)12
Code lines (lines that can run)8
Code lines that did run6
Code lines that did not run2
Coverage (did run/can run)75.00 %
Function listing
time 
Calls 
 line
 278 
        function labels = fixLabelsForCompatibility(labels)
 279 
            % Pre-R2016b, DimensionNames had almost no constraints, but there are new
 280 
            % requirements to support new dot subscripting functionality added in R2016b.
 281 
            % The old defaults met those requirements, so if the names are not (now) valid,
 282 
            % they must have been intentionally changed from their old defaults (or perhaps
 283 
            % DimensionNames{1} came from a column header in a file). In any case, to avoid
 284 
            % breaking existing table code, modify any invalid names and warn.
 285 
            import matlab.internal.datatypes.warningWithoutTrace
 286 
            
< 0.001 
      3 
 287
            originalLabels = labels; 
 288 
            % Pre-R2016b and from R2019b onward, names are not required to be valid MATLAB
 289 
            % identifiers. But post-R2019b, they must still be shorter than namelengthmax.
< 0.001 
      3 
 290
            matlab.internal.tabular.validateVariableNameLength(labels,'MATLAB:table:DimNameLengthMax'); 
 291 
            % Pre-2016b, names were not required to be distinct from the list of reserved names.
< 0.001 
      3 
 292
            wasReserved = matlab.internal.tabular.private.metaDim.checkReservedNames(labels); 
< 0.001 
      3 
 293
            if any(wasReserved) 
 294 
                warningWithoutTrace(message('MATLAB:table:DimnamesReservedNameConflictBackCompat',originalLabels{find(wasReserved,1)}));
 295 
                labels(wasReserved) = matlab.lang.makeUniqueStrings(labels(wasReserved),labels(wasReserved),namelengthmax);
< 0.001 
      3 
 296
            end 
< 0.001 
      3 
 297
        end 

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