Module evita.external.api.graphql
Class ExecutedEvent
java.lang.Object
jdk.internal.event.Event
jdk.jfr.Event
io.evitadb.core.metric.event.CustomMetricsExecutionEvent
io.evitadb.externalApi.graphql.metric.event.request.AbstractGraphQLRequestEvent
io.evitadb.externalApi.graphql.metric.event.request.ExecutedEvent
JFR Event fired when GQL request is full executed and its response sent to client.
- Author:
- Lukáš Hornych, FG Forrest a.s. (c) 2024
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumResponse status of GraphQL request -
Field Summary
Fields inherited from class io.evitadb.externalApi.graphql.metric.event.request.AbstractGraphQLRequestEvent
PACKAGE_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinish()Finish the event.Measures duration of request deserialization from previous state.Measures duration of operation execution from previous state.Measures duration of parsing from previous state.Measures duration of preparation from previous state.Measures duration of result serialization from previous state.Measures duration of validation deserialization from previous state.<T> TmeasureInternalEvitaDBExecution(Supplier<T> supplier) Measures duration of evitaDB execution within the supplier.<T> TmeasureInternalEvitaDBInputReconstruction(Supplier<T> supplier) Measures duration of evitaDB input reconstruction within the supplier.provideCatalogName(String catalogName) Provide catalog name for this event.provideOperationName(String operationName) Provide operation name for this event.provideOperationType(graphql.language.OperationDefinition.Operation operationType) Provide operation type for this event.provideResponseStatus(ExecutedEvent.ResponseStatus responseStatus) Provide response status for this event.provideRootFieldsProcessed(int rootFieldsProcessed)
-
Constructor Details
-
ExecutedEvent
-
-
Method Details
-
provideOperationType
@Nonnull public ExecutedEvent provideOperationType(@Nonnull graphql.language.OperationDefinition.Operation operationType) Provide operation type for this event. Can be called only once.- Returns:
- this
-
provideCatalogName
Provide catalog name for this event. Can be called only once.- Returns:
- this
-
provideOperationName
Provide operation name for this event. Can be called only once.- Returns:
- this
-
provideResponseStatus
@Nonnull public ExecutedEvent provideResponseStatus(@Nonnull ExecutedEvent.ResponseStatus responseStatus) Provide response status for this event. Can be called only once. Default isExecutedEvent.ResponseStatus.OK- Returns:
- this
-
provideRootFieldsProcessed
-
finishInputDeserialization
Measures duration of request deserialization from previous state. Should be called only once.- Returns:
- this
-
finishPreparation
Measures duration of preparation from previous state. Should be called only once.- Returns:
- this
-
finishParse
Measures duration of parsing from previous state. Should be called only once.- Returns:
- this
-
finishValidation
Measures duration of validation deserialization from previous state. Should be called only once.- Returns:
- this
-
measureInternalEvitaDBInputReconstruction
Measures duration of evitaDB input reconstruction within the supplier. Can be called mutliple times, all durations are summed.- Returns:
- this
-
measureInternalEvitaDBExecution
Measures duration of evitaDB execution within the supplier. Can be called mutliple times, all durations are summed.- Returns:
- this
-
finishOperationExecution
Measures duration of operation execution from previous state. Should be called only once.- Returns:
- this
-
finishResultSerialization
Measures duration of result serialization from previous state. Should be called only once. If not called, it is assumed that no result serialization was done and thus it took 0 seconds.- Returns:
- this
-
finish
Finish the event.- Returns:
- this
-