Interface IProfiler
public interface IProfiler
Interface which can be implemented to roll your own profiler for client requests.
See "Profiling Module" in the AppStore for more information.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The name of the HTTP header for the profiler request token. -
Method Summary
Modifier and TypeMethodDescriptionenterDatabase
(String sessionId, String requestId, String requestData, Long now) Method that is called upon issuing a new query to the database.enterRuntime
(String sessionId, String requestId, String userName, Set<String> userRoles, com.mendix.thirdparty.org.json.JSONObject jsonRequest, Long now) Method that is called upon handling a new request in the runtime.void
finishDatabase
(Object logObject, Long now) Method that is called upon finishing a query on the database.void
finishRuntime
(Object logObject, Long now) Method that is called upon finishing a request in the runtime.void
logClientData
(com.mendix.thirdparty.org.json.JSONObject jsonObject, String sessionId) Method that is called right afterenterRuntime(java.lang.String, java.lang.String, java.lang.String, java.util.Set<java.lang.String>, com.mendix.thirdparty.org.json.JSONObject, java.lang.Long)
, containing the same information.void
stop()
Stops the profiler.
-
Field Details
-
PROFILER_KEY
The name of the HTTP header for the profiler request token.- See Also:
-
-
Method Details
-
enterRuntime
Object enterRuntime(String sessionId, String requestId, String userName, Set<String> userRoles, com.mendix.thirdparty.org.json.JSONObject jsonRequest, Long now) Method that is called upon handling a new request in the runtime.- Parameters:
sessionId
- the session identifier of the requestrequestId
- the identifier of the requestuserName
- the name of the user that made the requestuserRoles
- the security roles of the user that made the requestjsonRequest
- the JSON content of the requestnow
- the timestamp of the request (in milliseconds since the Unix epoch)- Returns:
- some object that will be passed to the corresponding
finishRuntime(java.lang.Object, java.lang.Long)
-
finishRuntime
Method that is called upon finishing a request in the runtime.- Parameters:
logObject
- the object that was returned by the correspondingenterRuntime(java.lang.String, java.lang.String, java.lang.String, java.util.Set<java.lang.String>, com.mendix.thirdparty.org.json.JSONObject, java.lang.Long)
now
- the timestamp of the end of the request (in milliseconds since the Unix epoch)
-
enterDatabase
Method that is called upon issuing a new query to the database.- Parameters:
sessionId
- the session identifier of the session for which the query is maderequestId
- the identifier of the request for which the query is maderequestData
- the SQL statement that is sent to the databasenow
- the timestamp of the request (in milliseconds since the Unix epoch)- Returns:
- some object that will be passed to the corresponding
finishDatabase(java.lang.Object, java.lang.Long)
-
finishDatabase
Method that is called upon finishing a query on the database.- Parameters:
logObject
- the object that was returned by the correspondingenterDatabase(java.lang.String, java.lang.String, java.lang.String, java.lang.Long)
now
- the timestamp of the query result (in milliseconds since the Unix epoch)
-
logClientData
Method that is called right afterenterRuntime(java.lang.String, java.lang.String, java.lang.String, java.util.Set<java.lang.String>, com.mendix.thirdparty.org.json.JSONObject, java.lang.Long)
, containing the same information.- Parameters:
jsonObject
- the JSON content of the requestsessionId
- the session identifier of the request
-
stop
void stop()Stops the profiler.
-