This is a static copy of a profile report

Home

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

Parents (calling functions)

Function NameFunction TypeCalls
...avaMigrationTools.suppressedJavaFrameclass method22
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
101
if s.matlab.ui.internal.ForceJ...
220.007 s34.8%
99
c = onCleanup.empty;
220.005 s24.1%
107
c(1) = onCleanup(@() warning(w...
220.003 s13.5%
100
s = settings; 
220.002 s12.3%
111
c(2) = onCleanup(@()lastwarn(l...
220.002 s7.7%
All other lines  0.001 s7.6%
Totals  0.020 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
settingsfunction220.002 s9.8%
Self time (built-ins, overhead, etc.)  0.018 s90.2%
Totals  0.020 s100% 
Code Analyzer results
Line numberMessage
Coverage results
Show coverage for parent directory
Total lines in function15
Non-code lines (comments, blank lines)5
Code lines (lines that can run)10
Code lines that did run9
Code lines that did not run1
Coverage (did run/can run)90.00 %
Function listing
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.