This is a static copy of a profile report

Home

varNamesDim>varNamesDim.lengthenTo (Calls: 785, Time: 0.036 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\varNamesDim.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
tabular.subsasgnDotfunction785
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
124
obj.labels(1,newIndices) = new...
7850.019 s52.3%
122
obj.makeValidName(newLabels,'e...
7850.013 s35.3%
111
newIndices = (obj.length+1):ma...
7850.001 s2.7%
141
end
7850.001 s1.9%
126
obj.length = maxIndex;
7850.000 s1.1%
All other lines  0.002 s6.7%
Totals  0.036 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
varNamesDim>varNamesDim.makeValidNameclass method7850.010 s27.3%
Self time (built-ins, overhead, etc.)  0.026 s72.7%
Totals  0.036 s100% 
Code Analyzer results
Line numberMessage
133This import statement runs before any other code in function 'lengthenTo'. Consider placing it at the top of the function body.
Coverage results
Show coverage for parent directory
Total lines in function32
Non-code lines (comments, blank lines)10
Code lines (lines that can run)22
Code lines that did run13
Code lines that did not run9
Coverage (did run/can run)59.09 %
Function listing
time 
Calls 
 line
 110 
        function obj = lengthenTo(obj,maxIndex,newLabels)
< 0.001 
    785 
 111
            newIndices = (obj.length+1):maxIndex; 
< 0.001 
    785 
 112
            if nargin < 3 
 113 
                % Create default names for the new vars, making sure they don't conflict with
 114 
                % existing names.
 115 
                newLabels = obj.dfltLabels(newIndices);
 116 
                newLabels = matlab.lang.makeUniqueStrings(newLabels,obj.labels,namelengthmax);
 117 
                obj.labels(1,newIndices) = newLabels(:);
< 0.001 
    785 
 118
            else 
 119 
                % Assume that newLabels has already been checked by validateNativeSubscripts as
 120 
                % names, and that the new names don't conflict with existing names. But still have
 121 
                % to make sure the names are legal.
  0.013 
    785 
 122
                obj.makeValidName(newLabels,'error'); 
 123 
                
  0.019 
    785 
 124
                obj.labels(1,newIndices) = newLabels(:); 
< 0.001 
    785 
 125
            end 
< 0.001 
    785 
 126
            obj.length = maxIndex; 
 127 
            
 128 
            % Per-var properties need to be lengthened.
< 0.001 
    785 
 129
            if obj.hasDescrs, obj.descrs(1,newIndices) = {''}; end 
< 0.001 
    785 
 130
            if obj.hasUnits, obj.units(1,newIndices) = {''}; end 
< 0.001 
    785 
 131
            if obj.hasContinuity, obj.continuity(1,newIndices) = 'unset'; end 
< 0.001 
    785 
 132
            if obj.hasCustomProps 
 133 
                import matlab.internal.datatypes.defaultarrayLike
 134 
                f = fieldnames(obj.customProps);
 135 
                for i = 1:numel(f)
 136 
                    if ~isequal(size(obj.customProps.(f{i})),[0,0])
 137 
                        obj.customProps.(f{i})(1,newIndices) = defaultarrayLike([1,numel(newIndices)],'Like', obj.customProps.(f{i}),false);
 138 
                    end
 139 
                end
< 0.001 
    785 
 140
            end 
< 0.001 
    785 
 141
        end 

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