This is a static copy of a profile report

Home

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

Parents (calling functions)

Function NameFunction TypeCalls
ml_readimagefunction808
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
12
if isempty(temporary)
8080.030 s33.3%
38
tmp_dir = temporary;
8070.010 s11.1%
31
curr_dir = cd(tmp_dir);
10.010 s11.1%
11
persistent temporary;
8080.010 s11.1%
39
end
8070 s0%
All other lines  0.030 s33.3%
Totals  0.090 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
filesepfunction20 s0%
ispcfunction20 s0%
Self time (built-ins, overhead, etc.)  0.090 s100.0%
Totals  0.090 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function39
Non-code lines (comments, blank lines)13
Code lines (lines that can run)26
Code lines that did run24
Code lines that did not run2
Coverage (did run/can run)92.31 %
Function listing
   time   calls  line
1 function tmp_dir = tempdir
2 %TEMPDIR Get temporary directory.
3 % TEMPDIR returns the name of the temporary directory if one exists. A
4 % file separator is appended at the end.
5 %
6 % See also TEMPNAME, FULLFILE.
7
8 % Copyright 1984-2007 The MathWorks, Inc.
9 % $Revision: 5.15.4.3 $ $Date: 2007/12/06 13:30:07 $
10
0.01 808 11 persistent temporary;
0.03 808 12 if isempty(temporary)
1 13 if ispc
14 tmp_dir = getenv('TEMP'); % Microsoft's recommended name
1 15 else
1 16 tmp_dir = '';
1 17 end
18
1 19 if ( isempty(tmp_dir) )
1 20 tmp_dir = getenv('TMP'); % What everybody else uses
1 21 end
22
1 23 if (isempty(tmp_dir))
1 24 if ispc
25 tmp_dir = pwd; % Use current directory
1 26 else
1 27 tmp_dir = '/tmp/';
1 28 end
1 29 end
30 %resolve hard links
0.01 1 31 curr_dir = cd(tmp_dir);
1 32 tmp_dir = cd(curr_dir);
1 33 if (tmp_dir(end) ~= filesep)
1 34 tmp_dir = [tmp_dir filesep];
1 35 end
1 36 temporary = tmp_dir;
807 37 else
0.01 807 38 tmp_dir = temporary;
807 39 end