This is a static copy of a profile report

Home

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

Parents (calling functions)

Function NameFunction TypeCalls
...tions>DetectImportOptions.validateclass method2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
96
func.FileType = char(validates...
20.015 s96.7%
95
rhs = strip(string(rhs));
20.000 s1.0%
92
if ~isCorrectString &&...
20.000 s0.6%
91
isCorrectChar = ischar(rhs) &a...
20.000 s0.5%
98
end
20.000 s0.0%
All other lines  0.000 s1.2%
Totals  0.015 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
validatestringfunction20.014 s91.3%
Self time (built-ins, overhead, etc.)  0.001 s8.7%
Totals  0.015 s100% 
Code Analyzer results
Line numberMessage
Coverage results
Show coverage for parent directory
Total lines in function11
Non-code lines (comments, blank lines)2
Code lines (lines that can run)9
Code lines that did run7
Code lines that did not run2
Coverage (did run/can run)77.78 %
Function listing
time 
Calls 
 line
  88 
        function func = set.FileType(func,rhs)            
< 0.001 
      2 
  89
            isCorrectString = isstring(rhs) && isscalar(rhs) && ... 
  90 
                ~ismissing(rhs) && rhs ~= "";
< 0.001 
      2 
  91
            isCorrectChar = ischar(rhs) && ~isempty(rhs); 
< 0.001 
      2 
  92
            if ~isCorrectString && ~isCorrectChar 
  93 
                error(message("MATLAB:textio:textio:IncorrectTypeFileType"));
< 0.001 
      2 
  94
            end 
< 0.001 
      2 
  95
            rhs = strip(string(rhs)); 
  0.015 
      2 
  96
            func.FileType = char(validatestring(rhs,func.SupportedFileTypes, ... 
  97 
                "","'FileType'"));
< 0.001 
      2 
  98
        end 

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