Module: ActiveShopifyGraphQL::Logging::GraphqlControllerRuntime::ClassMethods
- Defined in:
- lib/active_shopify_graphql/logging/graphql_controller_runtime.rb
Instance Method Summary collapse
Instance Method Details
#log_process_action(payload) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/active_shopify_graphql/logging/graphql_controller_runtime.rb', line 18 def log_process_action(payload) = super runtime = payload[:graphql_runtime] cost = payload[:graphql_cost] if runtime&.positive? cost_info = cost&.positive? ? ", #{cost.round} cost" : "" << "GraphQL: #{runtime.round(1)}ms#{cost_info}" end end |