This is a static copy of a profile report

Home

metaDim>metaDim.metaDim (Calls: 2, Time: 0.002 s)
Generated 04-Jun-2021 04:11:24 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
...hImportOptionsSpreadsheet.executeImplclass method2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
64
obj = obj.init(length,labels);
20.001 s58.0%
63
if nargin < 3 || (nargin==3...
20.000 s9.6%
46
labels = metaDim.dfltLabels;
20.000 s5.4%
44
if nargin == 0
20.000 s3.1%
68
end
20.000 s0.4%
All other lines  0.001 s23.5%
Totals  0.002 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
tabularDimension>tabularDimension.initclass method20.001 s42.9%
...>tabularDimension.tabularDimensionclass method20.000 s6.3%
Self time (built-ins, overhead, etc.)  0.001 s50.9%
Totals  0.002 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function33
Non-code lines (comments, blank lines)10
Code lines (lines that can run)23
Code lines that did run8
Code lines that did not run15
Coverage (did run/can run)34.78 %
Function listing
time 
Calls 
 line
  36 
        function obj = metaDim(length,labels,backwardsCompatibility)
  37 
            % Technically, this is not a table dimension, it's more like a table
  38 
            % meta-dimension. But it's close enough to var and row names to
  39 
            % reuse the infrastructure. Always initialize with two default
  40 
            % names, and oriented as a row.
  41 
            import matlab.internal.datatypes.isCharStrings
  42 
            import matlab.internal.tabular.private.metaDim
  43 
            
< 0.001 
      2 
  44
            if nargin == 0 
< 0.001 
      2 
  45
                length = 2; 
< 0.001 
      2 
  46
                labels = metaDim.dfltLabels; 
  47 
            elseif nargin == 1
  48 
                labels = metaDim.dfltLabels;
  49 
            else
  50 
                % This is the relevant parts of validateAndAssignLabels
  51 
                if ~(isCharStrings(labels,true) && all(strlength(labels) > 0, 'all')) % require cellstr, whitespace, but not empty allowed
  52 
                    error(message('MATLAB:table:InvalidDimNames'));
  53 
                end
  54 
                labels = strtrim(labels(:)'); % a row vector, conveniently forces any empty to 0x1
  55 
                if (nargin > 2) && backwardsCompatibility % tables, for now
  56 
                    labels = obj.fixLabelsForCompatibility(labels);
  57 
                else % timetables
  58 
                    metaDim.makeValidName(labels,'error');
  59 
                    obj.checkDuplicateLabels(labels);
  60 
                end
< 0.001 
      2 
  61
            end 
  62 
            
< 0.001 
      2 
  63
            if nargin < 3 || (nargin==3 && ~backwardsCompatibility) 
  0.001 
      2 
  64
                obj = obj.init(length,labels); 
  65 
            else
  66 
                obj = obj.initWithCompatibility(length,labels);
< 0.001 
      2 
  67
            end 
< 0.001 
      2 
  68
        end 

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