JavaMigrationTools>suppressWarning (Calls: 22, Time: 0.020 s)
Generated 16-Jul-2020 17:09:20 using performance time.
class method in file /Applications/MATLAB_R2020a.app/toolbox/matlab/uitools/+matlab/+ui/+internal/JavaMigrationTools.m
Copy to new window for comparing multiple runs
Function Name | Function Type | Calls |
...avaMigrationTools.suppressedJavaFrame | class method | 22 |
Line Number | Code | Calls | Total Time | % Time | Time Plot |
101 | if s.matlab.ui.internal.ForceJ... | 22 | 0.007 s | 34.8% | |
99 | c = onCleanup.empty; | 22 | 0.005 s | 24.1% | |
107 | c(1) = onCleanup(@() warning(w... | 22 | 0.003 s | 13.5% | |
100 | s = settings; | 22 | 0.002 s | 12.3% | |
111 | c(2) = onCleanup(@()lastwarn(l... | 22 | 0.002 s | 7.7% | |
All other lines | 0.001 s | 7.6% | |||
Totals | 0.020 s | 100% |
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
settings | function | 22 | 0.002 s | 9.8% | |
Self time (built-ins, overhead, etc.) | 0.018 s | 90.2% | |||
Totals | 0.020 s | 100% |
Line number | Message |
Total lines in function | 15 |
Non-code lines (comments, blank lines) | 5 |
Code lines (lines that can run) | 10 |
Code lines that did run | 9 |
Code lines that did not run | 1 |
Coverage (did run/can run) | 90.00 % |
time | Calls | line | |
---|---|---|---|
98 | function c = suppressWarning (id) | ||
0.005 | 22 | 99 | c = onCleanup.empty; |
0.002 | 22 | 100 | s = settings; |
0.007 | 22 | 101 | if s.matlab.ui.internal.ForceJavaMigrationWarnings.ActiveValue |
102 | return; | ||
< 0.001 | 22 | 103 | end |
104 | |||
105 | % Temporarily disable the warning | ||
< 0.001 | 22 | 106 | w = warning('off',id); |
0.003 | 22 | 107 | c(1) = onCleanup(@() warning(w)); |
108 | |||
109 | % Cache and restore last warning | ||
< 0.001 | 22 | 110 | [lastmsg, lastid] = lastwarn; |
0.002 | 22 | 111 | c(2) = onCleanup(@()lastwarn(lastmsg, lastid)); |
< 0.001 | 22 | 112 | end |
Other subfunctions in this file are not included in this listing.