hgbehaviorfactory>localCreate (Calls: 6, Time: 0.030 s)
Generated 18-May-2021 16:05:25 using performance time.
subfunction in file /usr/local/MATLAB/R2021a/toolbox/matlab/graphics/hgbehaviorfactory.m
Copy to new window for comparing multiple runs
| Function Name | Function Type | Calls |
| hgbehaviorfactory | function | 6 |
| Line Number | Code | Calls | Total Time | % Time | Time Plot |
| 52 | bh = feval(info.constructor); | 6 | 0.018 s | 61.0% | |
| 43 | dat = localGetBehaviorInfo(hOb... | 6 | 0.008 s | 27.2% | |
| 59 | end | 72 | 0.001 s | 2.6% | |
| 49 | s = strcmpi(behavior_name,info... | 72 | 0.001 s | 2.4% | |
| 48 | info = dat{n}; | 72 | 0.001 s | 2.0% | |
| All other lines | 0.001 s | 4.8% | |||
| Totals | 0.030 s | 100% |
| Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
| hgbehaviorfactory>localGetBehaviorInfo | subfunction | 6 | 0.008 s | 25.8% | |
| ...DataCursorBehavior.DataCursorBehavior | class method | 6 | 0.002 s | 6.1% | |
| Self time (built-ins, overhead, etc.) | 0.020 s | 68.1% | |||
| Totals | 0.030 s | 100% |
| Line number | Message |
| 56 | The variable 'ret_h' appears to change size on every loop iteration. Consider preallocating for speed. |
| Total lines in function | 20 |
| Non-code lines (comments, blank lines) | 5 |
| Code lines (lines that can run) | 15 |
| Code lines that did run | 13 |
| Code lines that did not run | 2 |
| Coverage (did run/can run) | 86.67 % |
time | Calls | line | |
|---|---|---|---|
40 | function [ret_h] = localCreate(behavior_name, hObj) | ||
41 | |||
< 0.001 | 6 | 42 | ret_h = []; |
0.008 | 6 | 43 | dat = localGetBehaviorInfo(hObj); |
44 | % Note that ret_h cannot be used to accumulate both MCOS and UDD behavior | ||
45 | % objects. This should not happen currently since hgbehaviorfacotry is not | ||
46 | % called with a cell array of behavior_name. | ||
< 0.001 | 6 | 47 | for n = 1:length(dat) |
< 0.001 | 72 | 48 | info = dat{n}; |
< 0.001 | 72 | 49 | s = strcmpi(behavior_name,info.name); |
< 0.001 | 72 | 50 | if any(s) |
< 0.001 | 6 | 51 | behavior_name(s) = []; |
0.018 | 6 | 52 | bh = feval(info.constructor); |
< 0.001 | 6 | 53 | if isempty(ret_h) |
< 0.001 | 6 | 54 | ret_h = bh; |
55 | else | ||
56 | ret_h(end+1) = bh; | ||
< 0.001 | 6 | 57 | end |
< 0.001 | 72 | 58 | end |
< 0.001 | 72 | 59 | end |
Other subfunctions in this file are not included in this listing.