This is a static copy of a profile report

Home

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

Parents (calling functions)

Function NameFunction TypeCalls
...ptions>ImportOptions.ImportOptionsclass method2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
1
classdef PreserveVariableNames...
20.000 s0.6%
All other lines  0.000 s99.4%
Totals  0.000 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function47
Non-code lines (comments, blank lines)34
Code lines (lines that can run)13
Code lines that did run1
Code lines that did not run12
Coverage (did run/can run)7.69 %
Function listing
time 
Calls 
 line
< 0.001 
      2 
   1
classdef PreserveVariableNamesInput < matlab.io.internal.FunctionInterface 
   2 
    %
   3 
    
   4 
    %   Copyright 2019-2020 The MathWorks, Inc.
   5 
    
   6 
    properties (Parameter, Dependent)
   7 
        PreserveVariableNames(1,1) logical;
   8 
    end
   9 
    
  10 
    properties (Parameter)
  11 
        %VARIABLENAMINGRULE Controls the normalization of variable names.
  12 
        %
  13 
        %   "modify"   - Converts variable names to unique nonempty valid MATLAB
  14 
        %                identifiers.
  15 
        %
  16 
        %   "preserve" - Preserves variable names when importing. Will still
  17 
        %                make variable names unique and nonempty.
  18 
        %
  19 
        % See also READTABLE, PARQUETREAD
  20 
        VariableNamingRule = 'modify';
  21 
    end
  22 
    
  23 
    methods
  24 
        function obj = set.PreserveVariableNames(obj,rhs)
  25 
            if rhs
  26 
                obj.VariableNamingRule = 'preserve';
  27 
            else
  28 
                obj.VariableNamingRule = 'modify';
  29 
            end
  30 
        end
  31 
        
  32 
        function val = get.PreserveVariableNames(obj)
  33 
            val = (obj.VariableNamingRule == "preserve");
  34 
        end
  35 
        
  36 
        function obj = set.VariableNamingRule(obj,rhs)
  37 
            obj.VariableNamingRule = obj.validateNamingRule(rhs);
  38 
        end
  39 
    end
  40 
    
  41 
    methods (Static)
  42 
        function rhs = validateNamingRule(rhs)
  43 
            rhs = validatestring(rhs,{'modify', 'preserve'});
  44 
        end
  45 
    end
  46 
end
  47