This is a static copy of a profile report

Home

imagesci/private/getFileFromURL (1427 calls, 0.090 sec)
Generated 05-Nov-2014 07:52:34 using cpu time.
function in file /usr1/opt/matlab/7.13/toolbox/matlab/imagesci/private/getFileFromURL.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
imfinfofunction1427
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
23
else
14270.030 s33.3%
9
if (strfind(filenameIn, '://')...
14270.030 s33.3%
28
end
14270.020 s22.2%
26
filenameOut = filenameIn;
14270 s0%
25
isUrl = false;
14270 s0%
All other lines  0.010 s11.1%
Totals  0.090 s100% 
Children (called functions)
No children
Code Analyzer results
Line numberMessage
19Best practice is for CATCH to be followed by an identifier that gets the error information.
Coverage results
[ Show coverage for parent directory ]
Total lines in function28
Non-code lines (comments, blank lines)14
Code lines (lines that can run)14
Code lines that did run5
Code lines that did not run9
Coverage (did run/can run)35.71 %
Function listing
   time   calls  line
1 function [isUrl, filenameOut] = getFileFromURL(filenameIn)
2 %GETFILEFROMURL Detects whether the input filename is a URL and downloads
3 %file from the URL
4
5 % Copyright 2007-2010 The MathWorks, Inc.
6 % $Revision: 1.1.6.3 $ $Date: 2011/05/17 02:27:20 $
7
8 % Download remote file.
0.03 1427 9 if (strfind(filenameIn, '://'))
10
11 isUrl = true;
12
13 if (~usejava('jvm'))
14 error(message('MATLAB:imagesci:getFileFromURL:noJVM'))
15 end
16
17 try
18 filenameOut = urlwrite(filenameIn, tempname);
19 catch
20 error(message('MATLAB:imagesci:getFileFromURL:urlRead', filenameIn));
21 end
22
0.03 1427 23 else
24
1427 25 isUrl = false;
1427 26 filenameOut = filenameIn;
27
0.02 1427 28 end