This is a static copy of a profile report

Home

imagesci/private/readtif>parse_args (11550 calls, 3.234 sec)
Generated 05-Nov-2014 07:52:37 using cpu time.
subfunction in file /usr1/opt/matlab/7.13/toolbox/matlab/imagesci/private/readtif.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
imagesci/private/readtiffunction11550
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
129
check_info(args.info);
115500.761 s23.5%
99
if (isnumeric(argp))
227220.290 s9.0%
118
args.(params{idx}) = varargin{...
113610.260 s8.0%
127
end
227220.240 s7.4%
89
args.index = 1;
115500.220 s6.8%
All other lines  1.462 s45.2%
Totals  3.234 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
imagesci/private/readtif>check_infosubfunction115500.481 s14.9%
Self time (built-ins, overhead, etc.)  2.754 s85.1%
Totals  3.234 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function44
Non-code lines (comments, blank lines)17
Code lines (lines that can run)27
Code lines that did run19
Code lines that did not run8
Coverage (did run/can run)70.37 %
Function listing
   time   calls  line
86 function args = parse_args(varargin)
87 %PARSE_ARGS Convert input arguments to structure of arguments.
88
0.22 11550 89 args.index = 1;
0.08 11550 90 args.pixelregion = [];
0.13 11550 91 args.info = [];
92
0.06 11550 93 params = {'index', 'pixelregion', 'info'};
94
0.16 11550 95 p = 1;
0.11 11550 96 while (p <= nargin)
97
0.15 22722 98 argp = varargin{p};
0.29 22722 99 if (isnumeric(argp))
100
0.05 11361 101 args.index = argp;
0.02 11361 102 p = p + 1;
103
0.05 11361 104 elseif (ischar(argp))
105
0.20 11361 106 idx = find(strncmpi(argp, params, numel(argp)));
107
0.05 11361 108 if (isempty(idx))
109 error(message('MATLAB:imagesci:readtif:unknownParam', argp))
0.05 11361 110 elseif (numel(idx) > 1)
111 error(message('MATLAB:imagesci:readtif:ambiguousParam', argp))
112 end
113
0.06 11361 114 if (p == nargin)
115 error(message('MATLAB:imagesci:readtif:missingValue', argp))
116 end
117
0.26 11361 118 args.(params{idx}) = varargin{p + 1};
0.09 11361 119 p = p + 2;
120
121 else
122
123 error(message('MATLAB:imagesci:readtif:paramType'))
124
125 end
126
0.24 22722 127 end
128
0.76 11550 129 check_info(args.info);

Other subfunctions in this file are not included in this listing.