This is a static copy of a profile reportHome
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 Name | Function Type | Calls |
imfinfo | function | 1427 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
23 | else | 1427 | 0.030 s | 33.3% |  |
9 | if (strfind(filenameIn, '://')... | 1427 | 0.030 s | 33.3% |  |
28 | end | 1427 | 0.020 s | 22.2% |  |
26 | filenameOut = filenameIn; | 1427 | 0 s | 0% |  |
25 | isUrl = false; | 1427 | 0 s | 0% |  |
All other lines | | | 0.010 s | 11.1% |  |
Totals | | | 0.090 s | 100% | |
Children (called functions)
No childrenCode Analyzer results
Line number | Message |
19 | Best 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 function | 28 |
Non-code lines (comments, blank lines) | 14 |
Code lines (lines that can run) | 14 |
Code lines that did run | 5 |
Code lines that did not run | 9 |
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