This is a static copy of a profile report

Home

createDir (1 call, 0.557 sec)
Generated 05-Aug-2011 13:00:30 using cpu time.
function in file /home/LeechJ/cbass_analysis/reduc/support/createDir.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
reduceDatafunction1
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
20
d=framecut(d,ind);
10.339 s60.8%
46
unix(sprintf('mkdir %s',str));
210.087 s15.7%
23
the_date_string=datestr([start...
10.044 s7.8%
45
if (exist(str)~=7)
210.022 s3.9%
44
str=strcat(maindir,'/',subdir{...
210.011 s2.0%
All other lines  0.055 s9.8%
Totals  0.557 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
framecutfunction10.328 s58.8%
datestrfunction10.044 s7.8%
strcatfunction230.022 s3.9%
where_am_ifunction10 s0%
mjd2date_v2function10 s0%
getmonthfunction10 s0%
Self time (built-ins, overhead, etc.)  0.164 s29.4%
Totals  0.557 s100% 
Code Analyzer results
Line numberMessage
17The value assigned to variable 'month' might be unused.
30EXIST with two input arguments is generally faster and clearer than with one input argument.
39EXIST with two input arguments is generally faster and clearer than with one input argument.
45EXIST with two input arguments is generally faster and clearer than with one input argument.
Coverage results
[ Show coverage for parent directory ]
Total lines in function55
Non-code lines (comments, blank lines)29
Code lines (lines that can run)26
Code lines that did run26
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
   time   calls  line
1 function createDir(d,src)
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 % createDir(d,src)
4 %
5 % Creates the subdirectories for all the plotting functions
6 %
7 % sjcm
8 %
9 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10
11
1 12 subdir={'intro', 'pointing', 'intent', 'deglitch', 'positional', 'rfi', 'mains', 'alpha', 'rfactor', 'load', ...
13 'tau', 'tsys', 'noise', 'gain', 'astro', 'power', 'overf', 'rms', ...
14 'map', 'summary', 'fits'};
15
16
1 17 month=getmonth;
18
1 19 ind=d.array.frame.features>0 & d.array.frame.features<2^31;
0.34 1 20 d=framecut(d,ind);
1 21 start=mjd2date_v2(d.array.frame.utc(1));
22
0.04 1 23 the_date_string=datestr([start.year,start.month,start.day,start.hour,start.minute,round(start.second)]);
1 24 date_string_parts=regexp(the_date_string,' ','split');
1 25 time=sprintf('%s:%s',char(date_string_parts(1)),char(date_string_parts(2)));
26
1 27 [home,installeddir]=where_am_i();
0.01 1 28 maindir=strcat(home,'/',installeddir,'/reduc/',src);
29
1 30 if (exist(maindir)~=7)
0.01 1 31 unix(sprintf('mkdir %s',maindir));
1 32 end
33
34 %[r, user] = unix('whoami');
35
36
1 37 maindir=strcat(maindir,'/',time);
38
1 39 if (exist(maindir)~=7)
1 40 unix(sprintf('mkdir %s',maindir));
1 41 end
42
1 43 for i=1:length(subdir)
0.01 21 44 str=strcat(maindir,'/',subdir{i});
0.02 21 45 if (exist(str)~=7)
0.09 21 46 unix(sprintf('mkdir %s',str));
21 47 end
21 48 end
49
1 50 pause(0.1);
1 51 eval(sprintf('save %s/%s/reduc/maindir_%s.mat maindir',home,installeddir,src));
52
53
54
1 55 return;