This is a static copy of a profile report

Home

legend>setDisplayNames (Calls: 8, Time: 0.008 s)
Generated 16-Jul-2020 17:10:13 using performance time.
subfunction in file /Applications/MATLAB_R2020a.app/toolbox/matlab/scribe/legend.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
legend>make_legendsubfunction8
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
743
set(ch(k),'DisplayName', displ...
560.006 s73.9%
731
displayNameStr = deblank(strin...
560.000 s6.1%
744
end
560.000 s5.7%
726
if ~isempty(ch)
80.000 s4.9%
734
if ~isempty(displayNameStr) &a...
560.000 s2.2%
All other lines  0.001 s7.0%
Totals  0.008 s100% 
Children (called functions)
No children
Code Analyzer results
Line numberMessage
Coverage results
Show coverage for parent directory
Total lines in function23
Non-code lines (comments, blank lines)6
Code lines (lines that can run)17
Code lines that did run11
Code lines that did not run6
Coverage (did run/can run)64.71 %
Function listing
time 
Calls 
 line
 724 
function setDisplayNames(ch,strings)
 725 

< 0.001 
      8 
 726
if ~isempty(ch) 
< 0.001 
      8 
 727
    if isempty(strings) 
 728 
        matlab.graphics.illustration.internal.generateDisplayNames(ch);
< 0.001 
      8 
 729
    else 
< 0.001 
      8 
 730
        for k=1:length(ch) 
< 0.001 
     56 
 731
            displayNameStr = deblank(strings{k}); 
 732 
            % If the strings provided are a CHAR matrix, then we must split
 733 
            % them up using \n characters into a single char. g964785
< 0.001 
     56 
 734
            if ~isempty(displayNameStr) && ~isvector(displayNameStr) 
 735 
                tempDisplayStr = deblank(displayNameStr(1,:));
 736 
                for l = 2:size(displayNameStr,1)
 737 
                   tempDisplayStr = sprintf('%s\n%s', tempDisplayStr, deblank(displayNameStr(l,:)));
 738 
                end
 739 
                displayNameStr = tempDisplayStr;
< 0.001 
     56 
 740
            end 
 741 
            % Use 'set' instead of dot notation so that
 742 
            % default/factory/remove are treated as special keywords.
  0.006 
     56 
 743
            set(ch(k),'DisplayName', displayNameStr); 
< 0.001 
     56 
 744
        end 
< 0.001 
      8 
 745
    end 
< 0.001 
      8 
 746
end 

Other subfunctions in this file are not included in this listing.