This is a static copy of a profile report

Home

mdbfileonpath>getFileToRun (1 call, 0.010 sec)
Generated 14-Nov-2016 07:47:05 using cpu time.
subfunction in file /usr/local/MATLAB/MATLAB_Production_Server/R2015a/toolbox/matlab/codetools/mdbfileonpath.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
mdbfileonpath>checkIfShadowednested function1
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
205
if isFileInPackage(inPath_arg)...
10.010 s100.0%
242
end
10 s0%
241
end
10 s0%
237
if ( 1 ==strfind( fn, 'built-i...
10 s0%
235
fn = which(fileparts_Filename_...
10 s0%
All other lines  0 s0%
Totals  0.010 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
mdbfileonpath>isFileInPackagesubfunction10.010 s100.0%
filepartsfunction10 s0%
mdbfileonpath>isPrivatesubfunction10 s0%
mdbfileonpath>isObjectsubfunction10 s0%
Self time (built-ins, overhead, etc.)  0 s0%
Totals  0.010 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function44
Non-code lines (comments, blank lines)20
Code lines (lines that can run)24
Code lines that did run8
Code lines that did not run16
Coverage (did run/can run)33.33 %
Function listing
time 
calls 
 line
 199 
function fn = getFileToRun(inPath_arg)
 200 
    % Return a string containing the absolute path of the file that
 201 
    % MATLAB will run based on the input filename (e.g., foo)
 202 
    
 203 
    import com.mathworks.jmi.MatlabPath;
 204 
    
  0.01 
      1 
 205 
    if isFileInPackage(inPath_arg) || isObject(inPath_arg) 
 206 
        % 1) For MCOS files, we need to determine whether the parent 
 207 
        %    directory for the package or class is on the path. If the 
 208 
        %    parent directory is not on the path, then return the empty 
 209 
        %    string.
 210 
        parentPath = MatlabPath.getValidPathEntryParent(java.io.File(inPath_arg).getParentFile());
 211 
        if ~isDirectoryOnPath(char(parentPath.getPath))
 212 
            fn = '';
 213 
            return;
 214 
        end
 215 
        
 216 
        % 2) Next, determine what which thinks is the full path to the 
 217 
        %    class or method that we're trying to set a breakpoint in. 
 218 
        %    Then, look to see if the result of which is on the path (it 
 219 
        %    might not be if we're inside the class or package directory).
 220 
        whichResult = which(trimToMcosPath(inPath_arg));
 221 
        whichParentPath = MatlabPath.getValidPathEntryParent(java.io.File(whichResult).getParentFile());
 222 
        if isDirectoryOnPath(char(whichParentPath.getPath))
 223 
           fn = whichResult;
 224 
           return;
 225 
        end
 226 
        
 227 
        % 3) Finally, if the given file is on the path, and not found by
 228 
        %    which, simply return the given file.
 229 
        fn = inPath_arg;
      1 
 230 
    elseif isPrivate(inPath_arg) 
 231 
        % For files in a private use absolute path
 232 
        fn = which(inPath_arg);
      1 
 233 
    else  % make the variable names somewhat obscure -- geck 281208 
      1 
 234 
        [~, fileparts_Filename_Var] = fileparts(inPath_arg); 
      1 
 235 
        fn = which(fileparts_Filename_Var); 
 236 
        % correct returned built-ins to point to their matching file for the purposes of command-line help -- geck 376452
      1 
 237 
        if ( 1 ==strfind( fn, 'built-in (' ) ) 
 238 
            fn = fn(length('built-in (')+1:length(fn)-1); % e.g. matlabroot '/toolbox/matlab/ops/@single/plus'
 239 
            fn = [fn '.m'];
 240 
        end
      1 
 241 
    end 
      1 
 242 
end 

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