This is a static copy of a profile report

Home

HasPropertiesAsNVPairs>HasPropertiesAsNVPairs.parseInputs (Calls: 47, Time: 0.028 s)
Generated 04-Jun-2021 04:11:10 using performance time.
class method in file C:\Program Files\MATLAB\R2020b\toolbox\shared\io\general\+matlab\+io\+internal\+mixin\HasPropertiesAsNVPairs.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
...portOptions.TextVariableImportOptionsclass method30
...mportOptions.SpreadsheetImportOptionsclass method2
...tOptions.NumericVariableImportOptionsclass method15
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
35
obj.(param{:}) = results.(para...
320.012 s41.9%
7
p = getParserByClass(class(obj...
470.004 s15.3%
9
p.parse(argsIn{:});
470.002 s8.1%
40
end
4670.001 s4.9%
31
for param = names
470.001 s4.1%
All other lines  0.007 s25.7%
Totals  0.028 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
...ons>ImportOptions.set.NumVariablesclass method20.004 s15.8%
HasPropertiesAsNVPairs>getParserByClassclass method470.004 s14.0%
VarOptsInputs>VarOptsInputs.set.Typeclass method300.004 s13.6%
Self time (built-ins, overhead, etc.)  0.016 s56.6%
Totals  0.028 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function37
Non-code lines (comments, blank lines)8
Code lines (lines that can run)29
Code lines that did run25
Code lines that did not run4
Coverage (did run/can run)86.21 %
Function listing
time 
Calls 
 line
   6 
        function [obj, otherArgs] = parseInputs(obj,argsIn,priority)
  0.004 
     47 
   7
        p = getParserByClass(class(obj)); 
< 0.001 
     47 
   8
        if iscell(argsIn) 
  0.002 
     47 
   9
            p.parse(argsIn{:}); 
  10 
        else % must be a struct.
  11 
            p.parse(argsIn);
< 0.001 
     47 
  12
        end 
  13 
        
  14 
        % Deal the results to the converter.
< 0.001 
     47 
  15
        results  = p.Results; 
< 0.001 
     47 
  16
        defaults = string(p.UsingDefaults); 
< 0.001 
     47 
  17
        if exist('priority','var') 
  18 
            % Inputs are assigned in the order they appear in the argument list.
  19 
            % To change this order, move any proprties which may have dependencies to
  20 
            % the beginning of the list.
< 0.001 
      2 
  21
            names = p.Parameters(:)'; 
< 0.001 
      2 
  22
            names(any(names(:)==defaults(:)',2)) = []; 
< 0.001 
      2 
  23
            for i = numel(priority):-1:1 
< 0.001 
      8 
  24
                tomove = strcmpi(names,priority(i)); 
< 0.001 
      8 
  25
                names = [names(tomove) names(~tomove)]; 
< 0.001 
      8 
  26
            end 
< 0.001 
     45 
  27
        else  
< 0.001 
     45 
  28
            names = p.Parameters; 
< 0.001 
     47 
  29
        end 
  30 

  0.001 
     47 
  31
        for param = names 
  32 
            % only set the ones given by the user.
< 0.001 
    467 
  33
            if ~any(param==defaults) 
< 0.001 
     32 
  34
                try 
  0.012 
     32 
  35
                    obj.(param{:}) = results.(param{:}); 
  36 
                catch ME
  37 
                    throwAsCaller(ME)
< 0.001 
     32 
  38
                end 
< 0.001 
    467 
  39
            end 
  0.001 
    467 
  40
        end 
  0.001 
     47 
  41
        otherArgs = p.Unmatched; 
< 0.001 
     47 
  42
        end 

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