This is a static copy of a profile reportHome
hggetbehavior>localGet (70 calls, 0.131 sec)
Generated 05-Aug-2011 13:03:35 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/graphics/hggetbehavior.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
93 | b = hgbehaviorfactory(bn); | 70 | 0.098 s | 75.0% |  |
106 | end | 70 | 0.011 s | 8.3% |  |
91 | b = localPeek(h,bn); | 70 | 0.011 s | 8.3% |  |
79 | bb = get(h,'Behavior'); | 70 | 0.011 s | 8.3% |  |
114 | end | 70 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.131 s | 100% | |
Children (called functions)
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 39 |
Non-code lines (comments, blank lines) | 9 |
Code lines (lines that can run) | 30 |
Code lines that did run | 18 |
Code lines that did not run | 12 |
Coverage (did run/can run) | 60.00 % |
Function listing
time calls line
76 function [ret_h] = localGet(h,behavior_name)
77 % ToDo: Optimize to avoid excessive looping
78
0.01 70 79 bb = get(h,'Behavior');
70 80 ret_h = [];
81
70 82 if ischar(behavior_name)
70 83 behavior_name = {behavior_name};
70 84 end
85
86 % Note that ret_h cannot be used to accumulate both MCOS and UDD behavior
87 % objects. This should not happen currently since hggetbehavior is not
88 % called with a cell array of behavior_names.
70 89 for n = 1:length(behavior_name)
70 90 bn = behavior_name{n};
0.01 70 91 b = localPeek(h,bn);
70 92 if isempty(b)
0.10 70 93 b = hgbehaviorfactory(bn);
70 94 if ~isempty(b)
70 95 if ~dosupport(b,h)
96 error('MATLAB:GRAPHICS:HGGETBEHAVIOR',...
97 'Behavior object does not support this handle type.')
98 end
70 99 bb(1).(behavior_name{n}) = b;
70 100 set(h,'Behavior',bb);
70 101 if isempty(ret_h)
70 102 ret_h = b;
103 else
104 ret_h(end+1) = b; %#ok<AGROW>
105 end
0.01 70 106 end
107 else
108 if isempty(ret_h)
109 ret_h = b;
110 else
111 ret_h(end+1) = b; %#ok<AGROW>
112 end
113 end
70 114 end
Other subfunctions in this file are not included in this listing.