This is a static copy of a profile report

Home

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

Parents (calling functions)

Function NameFunction TypeCalls
...;ExecutableFunction.validateArgumentsclass method2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
39
[fn,exts] = validateFilename(o...
20.027 s96.6%
40
obj.Extension = exts{1};
20.000 s1.3%
41
obj.FilenameValidated = fn{1};
20.000 s0.7%
25
if hasIriPrefix(filename)
20.000 s0.6%
43
end
20.000 s0.0%
All other lines  0.000 s0.8%
Totals  0.028 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
...eptsReadableFilename.validateFilenameclass method20.026 s95.4%
Self time (built-ins, overhead, etc.)  0.001 s4.6%
Totals  0.028 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function25
Non-code lines (comments, blank lines)4
Code lines (lines that can run)21
Code lines that did run10
Code lines that did not run11
Coverage (did run/can run)47.62 %
Function listing
time 
Calls 
 line
  19 
        function obj = set.Filename(obj,filename)
  20 
            import matlab.io.internal.vfs.validators.hasIriPrefix
< 0.001 
      2 
  21
            filename = convertStringsToChars(filename); 
< 0.001 
      2 
  22
            if ~ischar(filename) 
  23 
                error(message('MATLAB:textio:textio:InvalidStringProperty','"filename"'));
< 0.001 
      2 
  24
            end 
< 0.001 
      2 
  25
            if hasIriPrefix(filename) 
  26 
                if ~obj.SupportsRemoteNatively
  27 
                    % get the local copy
  28 
                    obj.RemoteToLocal = matlab.io.internal.vfs.stream.RemoteToLocal(filename); %#ok<*MCSUP>
  29 
                    obj.FilenameValidated = obj.RemoteToLocal.LocalFileName;
  30 
                    [~,~,obj.Extension] = fileparts(obj.FilenameValidated);
  31 
                elseif isfile(filename) %check for existence
  32 
                    % pass on to the function
  33 
                    obj.FilenameValidated = filename;
  34 
                    [~,~,obj.Extension] = fileparts(matlab.io.internal.vfs.validators.IRIFilename(filename));
  35 
                else
  36 
                    error(message('MATLAB:textio:textio:FileNotFound', filename));
  37 
                end
< 0.001 
      2 
  38
            else 
  0.027 
      2 
  39
                [fn,exts] = validateFilename(obj,filename); 
< 0.001 
      2 
  40
                obj.Extension = exts{1}; 
< 0.001 
      2 
  41
                obj.FilenameValidated = fn{1}; 
< 0.001 
      2 
  42
            end 
< 0.001 
      2 
  43
            end 

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