This is a static copy of a profile reportHome
webpipe>subpages (20 calls, 0.142 sec)
Generated 05-Aug-2011 13:01:03 using cpu time.
subfunction in file /home/LeechJ/cbass_analysis/reduc/support/webpipe.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Function Name | Function Type | Calls |
webpipe | function | 20 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
317 | eval(sprintf('[s w] = unix(''l... | 20 | 0.077 s | 53.8% |  |
332 | fn=strcat(maindir,'/',dir{num}... | 16 | 0.022 s | 15.4% |  |
399 | return; | 16 | 0.011 s | 7.7% |  |
374 | eval(sprintf('[s w] = unix(''l... | 1 | 0.011 s | 7.7% |  |
348 | navfig(fid,numPlots); | 39 | 0.011 s | 7.7% |  |
All other lines | | | 0.011 s | 7.7% |  |
Totals | | | 0.142 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
strcat | function | 16 | 0.022 s | 15.4% |  |
webpipe>navfig | subfunction | 39 | 0.011 s | 7.7% |  |
webpipe>tail | subfunction | 16 | 0 s | 0% |  |
webpipe>header | subfunction | 16 | 0 s | 0% |  |
Self time (built-ins, overhead, etc.) | | | 0.109 s | 76.9% |  |
Totals | | | 0.142 s | 100% | |
Code Analyzer results
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 87 |
Non-code lines (comments, blank lines) | 36 |
Code lines (lines that can run) | 51 |
Code lines that did run | 50 |
Code lines that did not run | 1 |
Coverage (did run/can run) | 98.04 % |
Function listing
time calls line
313 function subpages(dir,maindir,num)
314
315 % first we need to find out how many plots there are:
316
0.08 20 317 eval(sprintf('[s w] = unix(''ls -l %s/%s'');', maindir, dir{num}));
318
20 319 f = strfind(w, '.png');
20 320 numPlots = length(f);
321
20 322 if (numPlots==0)
4 323 disp(['No plots found for ',dir{num}]);
4 324 return;
325 end;
326
327 % An overide to get the number of figures right in the fits dir
16 328 if(strcmp(dir{num},'fits'))
1 329 numPlots=3;
1 330 end
331
0.02 16 332 fn=strcat(maindir,'/',dir{num},'/fig1.html');
333
16 334 for i=1:numPlots
39 335 if(i==1)
16 336 fid=fopen(fn,'w');
16 337 header(fid);
16 338 fprintf(fid, '<p> <a name="fig1">');
23 339 else
340 % fid=fopen(fn,'a');
341 % if(fid == -1)
342 % message = ferror(fid)
343 % keyboard;
344 % end
0.01 23 345 fprintf(fid,sprintf('<p> <a name="fig%u">', i));
23 346 end
39 347 fprintf(fid,'<a href="../index.html">Overview</a>\n\n');
0.01 39 348 navfig(fid,numPlots);
39 349 fprintf(fid,'<pre>\n');
39 350 if (i==1)
16 351 fig=i;
23 352 else
23 353 fig=i-1;
23 354 end
39 355 fprintf(fid,sprintf('<a href="#fig%u">Back</a> ',fig));
39 356 if (i==numPlots)
16 357 fig=i;
23 358 else
23 359 fig=i+1;
23 360 end
39 361 fprintf(fid,sprintf(' <a href="#fig%u">Forward</a>\n',fig));
39 362 fprintf(fid,'</pre>\n\n');
39 363 fprintf(fid,sprintf('<img src="fig%u.png">\n\n',i));
39 364 fprintf(fid,'<hr>');
365
39 366 end
367
368
369
16 370 if(strcmp(dir{num},'fits'))
371 % Put links to the fits files in
372
373 % here is some madness to get the name of both fits files in the directory
0.01 1 374 eval(sprintf('[s w] = unix(''ls -l %s/%s/*.fits'');', maindir, dir{num}));
1 375 s2 = regexp(w, '/', 'split');
1 376 wanted_arr=regexp( char(s2(ceil(length(s2)/2))) , '\n', 'split');
1 377 first=char(wanted_arr(1));
1 378 second = char(s2(length(s2)));
379
380
1 381 fprintf(fid,'<h3> Raw fits file and map fits file</h3>\n');
382 %sprintf('<a href="%s">%s</a>\n\n',first,first)
383 %sprintf('<a href="%s">%s</a>\n\n',second,second)
384
1 385 fprintf(fid,'<p> <a href="%s">%s</a> </p>\n\n',first,first);
1 386 fprintf(fid,'<p> <a href="%s">%s</a> </p>\n\n',second,second);
387
1 388 end
389
390 %keyboard;
391 %keyboard;
392 %fclose(fid);
393
394 %fid = fopen(fn, 'a');
16 395 tail(fid);
396
16 397 fclose(fid);
398
0.01 16 399 return;
Other subfunctions in this file are not included in this listing.