from __future__ import annotations
import pxr.Trace._trace
import typing
import Boost.Python
import pxr.Trace

__all__ = [
    "AggregateNode",
    "Collector",
    "GetElapsedSeconds",
    "GetTestEventName",
    "Reporter",
    "TestAuto",
    "TestCreateEvents",
    "TestNesting"
]


class AggregateNode(Boost.Python.instance):
    """
    A representation of a call tree. Each node represents one or more
    calls that occurred in the trace. Multiple calls to a child node are
    aggregated into one node.
    """
    @property
    def children(self) -> None:
        """
        type : list[TraceAggregateNodePtr]

        :type: None
        """
    @property
    def count(self) -> None:
        """
        type : int


        Returns the call count of this node.


        ``recursive`` determines if recursive calls are counted.

        :type: None
        """
    @property
    def exclusiveCount(self) -> None:
        """
        type : int


        Returns the exclusive count.

        :type: None
        """
    @property
    def exclusiveTime(self) -> None:
        """
        type : TimeStamp


        Returns the time spent in this node but not its children.

        :type: None
        """
    @property
    def expanded(self) -> None:
        """
        type : bool


        Returns whether this node is expanded in a gui.

        ----------------------------------------------------------------------

        type : None


        Sets whether or not this node is expanded in a gui.

        :type: None
        """
    @property
    def expired(self) -> None:
        """
        True if this object has expired, False otherwise.

        :type: None
        """
    @property
    def id(self) -> None:
        """
        type : Id


        Returns the node's id.

        :type: None
        """
    @property
    def inclusiveTime(self) -> None:
        """
        type : TimeStamp


        Returns the total time of this node ands its children.

        :type: None
        """
    @property
    def key(self) -> None:
        """
        type : str


        Returns the node's key.

        :type: None
        """
    pass
class Collector(Boost.Python.instance):
    """
    This is a singleton class that records TraceEvent instances and
    populates TraceCollection instances.

    All public methods of TraceCollector are safe to call from any thread.
    """
    @staticmethod
    def BeginEvent(key) -> TimeStamp: 
        """
        BeginEvent(key) -> TimeStamp


        Record a begin event with *key* if ``Category`` is enabled.


        A matching end event is expected some time in the future.

        If the key is known at compile time ``BeginScope`` and ``Scope``
        methods are preferred because they have lower overhead.

        The TimeStamp of the TraceEvent or 0 if the collector is disabled.

        BeginScope

        Scope


        Parameters
        ----------
        key : Key
        """
    @staticmethod
    def BeginEventAtTime(key, ms) -> None: 
        """
        BeginEventAtTime(key, ms) -> None


        Record a begin event with *key* at a specified time if ``Category`` is
        enabled.


        This version of the method allows the passing of a specific number of
        elapsed milliseconds, *ms*, to use for this event. This method is used
        for testing and debugging code.


        Parameters
        ----------
        key : Key

        ms : float
        """
    @staticmethod
    def Clear() -> None: 
        """
        Clear() -> None


        Clear all pending events from the collector.


        No TraceCollection will be made for these events.
        """
    @staticmethod
    def EndEvent(key) -> TimeStamp: 
        """
        EndEvent(key) -> TimeStamp


        Record an end event with *key* if ``Category`` is enabled.


        A matching begin event must have preceded this end event.

        If the key is known at compile time EndScope and Scope methods are
        preferred because they have lower overhead.

        The TimeStamp of the TraceEvent or 0 if the collector is disabled.

        EndScope

        Scope


        Parameters
        ----------
        key : Key
        """
    @staticmethod
    def EndEventAtTime(key, ms) -> None: 
        """
        EndEventAtTime(key, ms) -> None


        Record an end event with *key* at a specified time if ``Category`` is
        enabled.


        This version of the method allows the passing of a specific number of
        elapsed milliseconds, *ms*, to use for this event. This method is used
        for testing and debugging code.


        Parameters
        ----------
        key : Key

        ms : float
        """
    @staticmethod
    def GetLabel() -> str: 
        """
        GetLabel() -> str


        Return the label associated with this collector.
        """
    @property
    def enabled(self) -> None:
        """
        **classmethod** type : bool


        Returns whether collection of events is enabled for DefaultCategory.

        ----------------------------------------------------------------------

        type : None


        Enables or disables collection of events for DefaultCategory.

        :type: None
        """
    @property
    def expired(self) -> None:
        """
        True if this object has expired, False otherwise.

        :type: None
        """
    @property
    def pythonTracingEnabled(self) -> None:
        """
        type : None


        Set whether automatic tracing of all python scopes is enabled.

        ----------------------------------------------------------------------

        type : bool


        Returns whether automatic tracing of all python scopes is enabled.

        :type: None
        """
    pass
class Reporter(Boost.Python.instance):
    """
    This class converts streams of TraceEvent objects into call trees
    which can then be used as a data source to a GUI or written out to a
    file.
    """
    @staticmethod
    def ClearTree() -> None: 
        """
        ClearTree() -> None


        Clears event tree and counters.
        """
    @staticmethod
    def GetLabel() -> str: 
        """
        GetLabel() -> str


        Return the label associated with this reporter.
        """
    @staticmethod
    def Report(s, iterationCount) -> None: 
        """
        Report(s, iterationCount) -> None


        Generates a report to the ostream *s*, dividing all times by
        *iterationCount*.


        Parameters
        ----------
        s : ostream

        iterationCount : int
        """
    @staticmethod
    def ReportChromeTracing(s) -> None: 
        """
        ReportChromeTracing(s) -> None


        Generates a timeline trace report suitable for viewing in Chrome's
        trace viewer.


        Parameters
        ----------
        s : ostream
        """
    @staticmethod
    def ReportChromeTracingToFile(*args, **kwargs) -> None: ...
    @staticmethod
    def ReportTimes(s) -> None: 
        """
        ReportTimes(s) -> None


        Generates a report of the times to the ostream *s*.


        Parameters
        ----------
        s : ostream
        """
    @staticmethod
    def UpdateTraceTrees() -> None: 
        """
        UpdateTraceTrees() -> None


        This fully re-builds the event and aggregate trees from whatever the
        current collection holds.


        It is ok to call this multiple times in case the collection gets
        appended on inbetween.

        If we want to have multiple reporters per collector, this will need to
        be changed so that all reporters reporting on a collector update their
        respective trees.
        """
    @property
    def aggregateTreeRoot(self) -> None:
        """
        type : AggregateNode


        Returns the root node of the aggregated call tree.

        :type: None
        """
    @property
    def expired(self) -> None:
        """
        True if this object has expired, False otherwise.

        :type: None
        """
    @property
    def foldRecursiveCalls(self) -> None:
        """
        type : bool


        Returns the current setting for recursion folding for stack trace
        event reporting.

        ----------------------------------------------------------------------

        type : None


        When stack trace event reporting, this sets whether or not recursive
        calls are folded in the output.


        Recursion folding is useful when the stacks contain deep recursive
        structures.

        :type: None
        """
    @property
    def groupByFunction(self) -> None:
        """
        type : bool


        Returns the current group-by-function state.

        ----------------------------------------------------------------------

        type : None


        This affects only stack trace event reporting.


        If ``true`` then all events in a function are grouped together
        otherwise events are split out by address.

        :type: None
        """
    @property
    def shouldAdjustForOverheadAndNoise(self) -> None:
        """
        type : None


        Set whether or not the reporter should adjust scope times for overhead
        and noise.

        :type: None
        """
    globalReporter: pxr.Trace.Reporter
    pass
def GetElapsedSeconds(*args, **kwargs) -> None:
    pass
def GetTestEventName(*args, **kwargs) -> None:
    pass
def TestAuto(*args, **kwargs) -> None:
    pass
def TestCreateEvents(*args, **kwargs) -> None:
    pass
def TestNesting(*args, **kwargs) -> None:
    pass
__MFB_FULL_PACKAGE_NAME = 'trace'
