This is a static copy of a profile report

Home

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

Parents (calling functions)

Function NameFunction TypeCalls
...t;varNamesDim.validateAndAssignLabelsclass method8
...t;rowNamesDim.validateAndAssignLabelsclass method8
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
391
obj.hasLabels = true;
160.001 s26.4%
386
if isvector(newLabels)
160.001 s18.0%
392
obj.labels = newLabels;
160.001 s17.8%
388
if numel(newLabels) ~= obj.len...
160.001 s16.5%
385
if fullAssignment
160.000 s4.8%
All other lines  0.001 s16.4%
Totals  0.003 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function23
Non-code lines (comments, blank lines)5
Code lines (lines that can run)18
Code lines that did run9
Code lines that did not run9
Coverage (did run/can run)50.00 %
Function listing
time 
Calls 
 line
 384 
        function obj = assignLabels(obj,newLabels,fullAssignment,indices)
< 0.001 
     16 
 385
            if fullAssignment 
< 0.001 
     16 
 386
                if isvector(newLabels) 
 387 
                    % The number of new labels has to match what's being assigned to.
< 0.001 
     16 
 388
                    if numel(newLabels) ~= obj.length 
 389 
                        obj.throwIncorrectNumberOfLabels();
< 0.001 
     16 
 390
                    end 
< 0.001 
     16 
 391
                    obj.hasLabels = true; 
< 0.001 
     16 
 392
                    obj.labels = newLabels; 
 393 
                else % a 0x0
 394 
                    % Full assignment of a 0x0 clears out the existing labels, if allowed above by
 395 
                    % the subclass's validateLabels.
 396 
                    obj.labels = newLabels([]); % force a 0x0, for cosmetics
 397 
                    obj.hasLabels = false;
< 0.001 
     16 
 398
                end 
 399 
            else % subscripted assignment
 400 
                % The number of new labels has to match what's being assigned to.
 401 
                if numel(newLabels) ~= numel(indices)
 402 
                    obj.throwIncorrectNumberOfLabelsPartial();
 403 
                end
 404 
                obj.labels(indices) = newLabels;
< 0.001 
     16 
 405
            end 
< 0.001 
     16 
 406
        end 

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