This is a static copy of a profile report

Home

metaDim>metaDim.checkAgainstVarLabels (Calls: 8, Time: 0.019 s)
Generated 16-Jul-2020 17:09:53 using performance time.
class method in file /Applications/MATLAB_R2020a.app/toolbox/matlab/datatypes/tabular/+matlab/+internal/+tabular/+private/metaDim.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
table.table>table.initclass method8
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
106
[modifiedLabels,wasConflicted]...
80.017 s92.4%
107
matlab.internal.tabular.valida...
80.001 s5.0%
127
end
80.000 s0.2%
108
if any(wasConflicted)
80.000 s0.0%
126
end
80.000 s0.0%
All other lines  0.000 s2.5%
Totals  0.019 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
makeUniqueStringsfunction80.016 s86.7%
validateVariableNameLengthfunction80.000 s1.5%
Self time (built-ins, overhead, etc.)  0.002 s11.7%
Totals  0.019 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function27
Non-code lines (comments, blank lines)6
Code lines (lines that can run)21
Code lines that did run5
Code lines that did not run16
Coverage (did run/can run)23.81 %
Function listing
time 
Calls 
 line
 101 
        function obj = checkAgainstVarLabels(obj,varLabels,errorMode)
 102 
            import matlab.internal.datatypes.warningWithoutTrace
 103 
            % Pre-2016b, DimensionNames were not required to be distinct from VariableNames,
 104 
            % but now they are. The caller may ask to error if they conflict, or to modify
 105 
            % DimensionNames with a warning or silently.
  0.017 
      8 
 106
            [modifiedLabels,wasConflicted] = matlab.lang.makeUniqueStrings(obj.labels,varLabels,namelengthmax); 
< 0.001 
      8 
 107
            matlab.internal.tabular.validateVariableNameLength(obj.labels,'MATLAB:table:DimNameLengthMax'); 
< 0.001 
      8 
 108
            if any(wasConflicted) 
 109 
                if nargin > 2
 110 
                    switch errorMode
 111 
                    case 'silent'
 112 
                        % OK
 113 
                    case 'warn'
 114 
                        warningWithoutTrace(message('MATLAB:table:DuplicateDimNamesVarNamesWarn',obj.labels{find(wasConflicted,1)}));
 115 
                    case 'error'
 116 
                        throwAsCaller(MException(message('MATLAB:table:DuplicateDimNamesVarNames',obj.labels{find(wasConflicted,1)})));
 117 
                    case 'warnBackCompat' % Only used for table loadobj. From 2019b on, table dimname-varname clashes typically error.
 118 
                        warningWithoutTrace(message('MATLAB:table:DuplicateDimnamesVarnamesBackCompat',obj.labels{find(wasConflicted,1)}));
 119 
                    otherwise
 120 
                        assert(false);
 121 
                    end
 122 
                else
 123 
                    throwAsCaller(MException(message('MATLAB:table:DuplicateDimNamesVarNames',obj.labels{find(wasConflicted,1)})));
 124 
                end
 125 
                obj.labels = modifiedLabels;
< 0.001 
      8 
 126
            end 
< 0.001 
      8 
 127
        end 

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