程序包 com.mysql.cj.log

接口 ProfilerEvent

    • 字段详细资料

      • TYPE_USAGE

        static final byte TYPE_USAGE
        Profiler event for usage advisor
        另请参阅:
        常量字段值
      • TYPE_OBJECT_CREATION

        static final byte TYPE_OBJECT_CREATION
        Profiler creating object type event
        另请参阅:
        常量字段值
      • TYPE_PREPARE

        static final byte TYPE_PREPARE
        Profiler event for prepared statements being prepared
        另请参阅:
        常量字段值
      • TYPE_QUERY

        static final byte TYPE_QUERY
        Profiler event for a query being executed
        另请参阅:
        常量字段值
      • TYPE_EXECUTE

        static final byte TYPE_EXECUTE
        Profiler event for prepared statements being executed
        另请参阅:
        常量字段值
      • TYPE_FETCH

        static final byte TYPE_FETCH
        Profiler event for result sets being retrieved
        另请参阅:
        常量字段值
      • TYPE_SLOW_QUERY

        static final byte TYPE_SLOW_QUERY
        Profiler event for slow query
        另请参阅:
        常量字段值
      • NA

        static final byte NA
        Not available value.
        另请参阅:
        常量字段值
    • 方法详细资料

      • getEventType

        byte getEventType()
        Returns the event type
        返回:
        the event type
      • getHostName

        String getHostName()
        Returns the host name the event occurred on.
        返回:
        host name
      • getDatabase

        String getDatabase()
        Returns the database the event occurred on.
        返回:
        the database in use
      • getConnectionId

        long getConnectionId()
        Returns the id of the associated connection (-1 for none).
        返回:
        the connection in use
      • getStatementId

        int getStatementId()
        Returns the id of the associated statement (-1 for none).
        返回:
        the statement in use
      • getResultSetId

        int getResultSetId()
        Returns the id of the associated result set (-1 for none).
        返回:
        the result set in use
      • getEventCreationTime

        long getEventCreationTime()
        Returns the time (in System.currentTimeMillis() form) when this event was created.
        返回:
        the time this event was created
      • getEventDuration

        long getEventDuration()
        Returns the duration of the event in milliseconds
        返回:
        the duration of the event in milliseconds
      • getDurationUnits

        String getDurationUnits()
        Returns the units for getEventDuration()
        返回:
        name of duration units
      • getEventCreationPointAsString

        String getEventCreationPointAsString()
        Returns the description of where the event was created.
        返回:
        a description of where this event was created.
      • getMessage

        String getMessage()
        Returns the optional message for this event
        返回:
        the message stored in this event
      • pack

        byte[] pack()
        Creates a binary representation of this event.
        返回:
        a binary representation of this event