Package com.mysql.cj.log
Interface ProfilerEvent
- All Known Implementing Classes:
ProfilerEventImpl
public interface ProfilerEvent
-
Field Summary
Fields Modifier and Type Field Description static byteNANot available value.static byteTYPE_EXECUTEProfiler event for prepared statements being executedstatic byteTYPE_FETCHProfiler event for result sets being retrievedstatic byteTYPE_OBJECT_CREATIONProfiler creating object type eventstatic byteTYPE_PREPAREProfiler event for prepared statements being preparedstatic byteTYPE_QUERYProfiler event for a query being executedstatic byteTYPE_SLOW_QUERYProfiler event for slow querystatic byteTYPE_USAGEProfiler event for usage advisor -
Method Summary
Modifier and Type Method Description longgetConnectionId()Returns the id of the associated connection (-1 for none).java.lang.StringgetDatabase()Returns the database the event occurred on.java.lang.StringgetDurationUnits()Returns the units for getEventDuration()java.lang.StringgetEventCreationPointAsString()Returns the description of where the event was created.longgetEventCreationTime()Returns the time (in System.currentTimeMillis() form) when this event was created.longgetEventDuration()Returns the duration of the event in millisecondsbytegetEventType()Returns the event typejava.lang.StringgetHostName()Returns the host name the event occurred on.java.lang.StringgetMessage()Returns the optional message for this eventintgetResultSetId()Returns the id of the associated result set (-1 for none).intgetStatementId()Returns the id of the associated statement (-1 for none).byte[]pack()Creates a binary representation of this event.
-
Field Details
-
TYPE_USAGE
static final byte TYPE_USAGEProfiler event for usage advisor- See Also:
- Constant Field Values
-
TYPE_OBJECT_CREATION
static final byte TYPE_OBJECT_CREATIONProfiler creating object type event- See Also:
- Constant Field Values
-
TYPE_PREPARE
static final byte TYPE_PREPAREProfiler event for prepared statements being prepared- See Also:
- Constant Field Values
-
TYPE_QUERY
static final byte TYPE_QUERYProfiler event for a query being executed- See Also:
- Constant Field Values
-
TYPE_EXECUTE
static final byte TYPE_EXECUTEProfiler event for prepared statements being executed- See Also:
- Constant Field Values
-
TYPE_FETCH
static final byte TYPE_FETCHProfiler event for result sets being retrieved- See Also:
- Constant Field Values
-
TYPE_SLOW_QUERY
static final byte TYPE_SLOW_QUERYProfiler event for slow query- See Also:
- Constant Field Values
-
NA
static final byte NANot available value.- See Also:
- Constant Field Values
-
-
Method Details
-
getEventType
byte getEventType()Returns the event type- Returns:
- the event type
-
getHostName
java.lang.String getHostName()Returns the host name the event occurred on.- Returns:
- host name
-
getDatabase
java.lang.String getDatabase()Returns the database the event occurred on.- Returns:
- the database in use
-
getConnectionId
long getConnectionId()Returns the id of the associated connection (-1 for none).- Returns:
- the connection in use
-
getStatementId
int getStatementId()Returns the id of the associated statement (-1 for none).- Returns:
- the statement in use
-
getResultSetId
int getResultSetId()Returns the id of the associated result set (-1 for none).- Returns:
- the result set in use
-
getEventCreationTime
long getEventCreationTime()Returns the time (in System.currentTimeMillis() form) when this event was created.- Returns:
- the time this event was created
-
getEventDuration
long getEventDuration()Returns the duration of the event in milliseconds- Returns:
- the duration of the event in milliseconds
-
getDurationUnits
java.lang.String getDurationUnits()Returns the units for getEventDuration()- Returns:
- name of duration units
-
getEventCreationPointAsString
java.lang.String getEventCreationPointAsString()Returns the description of where the event was created.- Returns:
- a description of where this event was created.
-
getMessage
java.lang.String getMessage()Returns the optional message for this event- Returns:
- the message stored in this event
-
pack
byte[] pack()Creates a binary representation of this event.- Returns:
- a binary representation of this event
-