This is a static copy of a profile report

Home

isprop>hasProp (Calls: 15, Time: 0.005 s)
Generated 18-May-2021 16:05:14 using performance time.
subfunction in file /usr/local/MATLAB/R2021a/toolbox/matlab/datatypes/isprop.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
ispropfunction15
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
60
p = findprop(obj, propName); %...
150.001 s20.6%
61
tf= ~isempty(p) && str...
150.001 s17.8%
53
if isa(obj, 'double') % In cas...
150.001 s15.2%
45
if isa(obj, 'double') 
150.001 s14.1%
69
end
150.000 s9.9%
All other lines  0.001 s22.4%
Totals  0.005 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function32
Non-code lines (comments, blank lines)3
Code lines (lines that can run)29
Code lines that did run11
Code lines that did not run18
Coverage (did run/can run)37.93 %
Function listing
time 
Calls 
 line
  42 
function tf = hasProp( obj, propName )
< 0.001 
     15 
  43
    try 
< 0.001 
     15 
  44
        if ( isa(obj, 'handle') || ~isobject(obj) ) % COM is an example that returns FALSE from ISOBJECT but should go into this branch 
< 0.001 
     15 
  45
            if isa(obj, 'double')  
  46 
                % Get MCOS representation of Simulink object to avoid calling handle() for Simulink handle.
  47 
                % This will return MCOS representation of Simulink Object if applicable, otherwise, return [].
  48 
                simulinkObject = matlab.internal.getSimulinkObject(obj);
  49 
                if isa(simulinkObject, 'Simulink.DABaseObject') % Valid Simulink Object
  50 
                    obj = simulinkObject;
  51 
                end
< 0.001 
     15 
  52
            end 
< 0.001 
     15 
  53
            if isa(obj, 'double') % In case the object is casted to double 
  54 
                obj = handle(obj);
  55 
                if ishghandle(obj) % graphics handle
  56 
                    tf = isprop(obj, propName); % delegate to HG ISPROP overload
  57 
                    return
  58 
                end
< 0.001 
     15 
  59
            end 
< 0.001 
     15 
  60
            p = findprop(obj, propName); % match case sensitivity determined by the object's FINDPROP 
< 0.001 
     15 
  61
            tf= ~isempty(p) && strcmpi(p.Name,propName); % make sure property match to the complete query text 
  62 
        else % assume FINDPROP is not defined for OBJ and query METACLASS
  63 
            mc = metaclass(obj);
  64 
            if isempty(mc)  % no property
  65 
                tf = false;
  66 
            else
  67 
                tf = ~isempty( findobj(mc.PropertyList, '-depth',0,'Name', propName) );
  68 
            end
< 0.001 
     15 
  69
        end 
  70 
    catch
  71 
        tf = false;
< 0.001 
     15 
  72
    end 
< 0.001 
     15 
  73
end 

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