This is a static copy of a profile report

Home

graphics/private/fireprintbehavior (12 calls, 1.270 sec)
Generated 14-Nov-2016 07:47:19 using cpu time.
function in file /usr/local/MATLAB/MATLAB_Production_Server/R2015a/toolbox/matlab/graphics/private/fireprintbehavior.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
...PrintPath>LocalSetupContentChangessubfunction6
...intPath>LocalRestoreContentChangessubfunction6
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
11
allobj = findall(h, 'type', 'F...
121.250 s98.4%
16
behavior = hggetbehavior(allob...
1560.010 s0.8%
15
if ishandle(allobj(k)) % callb...
1560.010 s0.8%
35
end
120 s0%
34
end
1560 s0%
All other lines  0 s0%
Totals  1.270 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
findallfunction121.250 s98.4%
hggetbehaviorfunction1560.010 s0.8%
Self time (built-ins, overhead, etc.)  0.010 s0.8%
Totals  1.270 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function35
Non-code lines (comments, blank lines)10
Code lines (lines that can run)25
Code lines that did run11
Code lines that did not run14
Coverage (did run/can run)44.00 %
Function listing
time 
calls 
 line
   1 
function fireprintbehavior(h,callbackName)
   2 
    %FIREPRINTBEHAVIOR Fire callback for Print behavior customization
   3 
    %    Helper function for printing. Do not call directly.
   4 
     
   5 
    
   6 
    %   Copyright 1984-2013 The MathWorks, Inc.
   7 
    
     12 
   8 
    if graphicsversion(h, 'handlegraphics') 
   9 
        allobj = findall(h);
     12 
  10 
    else 
  1.25 
     12 
  11 
        allobj = findall(h, 'type', 'Figure', '-or', 'type', 'Axes', ... 
  12 
             '-or', '-isa', 'matlab.graphics.shape.internal.ScribeGrid');
     12 
  13 
    end 
     12 
  14 
    for k=1:length(allobj) 
  0.01 
    156 
  15 
        if ishandle(allobj(k)) % callbacks might delete other handles 
  0.01 
    156 
  16 
            behavior = hggetbehavior(allobj(k),'Print','-peek'); 
    156 
  17 
            if ~isempty(behavior) && isprop(behavior, callbackName) && ... 
  18 
                    ~isempty(get(behavior,callbackName))
  19 
                
  20 
                cb = get(behavior,callbackName);
  21 
                if isa(cb,'function_handle')
  22 
                    cb(handle(allobj(k)),callbackName);
  23 
                elseif iscell(cb)
  24 
                    if length(cb) > 1
  25 
                        feval(cb{1},handle(allobj(k)),callbackName,cb{2:end});
  26 
                    else
  27 
                        feval(cb{1},handle(allobj(k)),callbackName);
  28 
                    end
  29 
                else
  30 
                    feval(cb,handle(allobj(k)),callbackName);
  31 
                end
  32 
            end
    156 
  33 
        end 
    156 
  34 
    end 
     12 
  35 
end