hgbehaviorfactory>localCreate (Calls: 32, Time: 0.023 s)
Generated 16-Jul-2020 17:09:26 using performance time.
subfunction in file /Applications/MATLAB_R2020a.app/toolbox/matlab/graphics/hgbehaviorfactory.m
Copy to new window for comparing multiple runs
| Function Name | Function Type | Calls |
| hgbehaviorfactory | function | 32 |
| Line Number | Code | Calls | Total Time | % Time | Time Plot |
| 43 | dat = localGetBehaviorInfo(hOb... | 32 | 0.011 s | 47.6% | |
| 52 | bh = feval(info.constructor); | 32 | 0.008 s | 32.5% | |
| 59 | end | 384 | 0.001 s | 5.1% | |
| 48 | info = dat{n}; | 384 | 0.001 s | 4.3% | |
| 49 | s = strcmpi(behavior_name,info... | 384 | 0.001 s | 3.8% | |
| All other lines | 0.002 s | 6.8% | |||
| Totals | 0.023 s | 100% |
| Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
| hgbehaviorfactory>localGetBehaviorInfo | subfunction | 32 | 0.011 s | 45.4% | |
| ...>PlotEditBehavior.PlotEditBehavior | class method | 16 | 0.001 s | 6.3% | |
| ...havior>PrintBehavior.PrintBehavior | class method | 16 | 0.001 s | 5.6% | |
| Self time (built-ins, overhead, etc.) | 0.010 s | 42.7% | |||
| Totals | 0.023 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 | 32 | 42 | ret_h = []; |
0.011 | 32 | 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 | 32 | 47 | for n = 1:length(dat) |
< 0.001 | 384 | 48 | info = dat{n}; |
< 0.001 | 384 | 49 | s = strcmpi(behavior_name,info.name); |
< 0.001 | 384 | 50 | if any(s) |
< 0.001 | 32 | 51 | behavior_name(s) = []; |
0.008 | 32 | 52 | bh = feval(info.constructor); |
< 0.001 | 32 | 53 | if isempty(ret_h) |
< 0.001 | 32 | 54 | ret_h = bh; |
55 | else | ||
56 | ret_h(end+1) = bh; | ||
< 0.001 | 32 | 57 | end |
< 0.001 | 384 | 58 | end |
0.001 | 384 | 59 | end |
Other subfunctions in this file are not included in this listing.