Class: Cassie::Statements::Logging::ExecuteEvent
- Inherits:
-
ActiveSupport::Notifications::Event
- Object
- ActiveSupport::Notifications::Event
- Cassie::Statements::Logging::ExecuteEvent
- Defined in:
- lib/cassie/statements/logging/execute_event.rb
Defined Under Namespace
Modules: Inspector
Instance Method Summary collapse
-
#duration ⇒ Object
in milliseconds.
- #message ⇒ Object
Instance Method Details
#duration ⇒ Object
in milliseconds
4 5 6 7 8 9 |
# File 'lib/cassie/statements/logging/execute_event.rb', line 4 def duration # in milliseconds return super unless traced? # trace duration is in microseconds trace.duration / 1000.0 end |
#message ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/cassie/statements/logging/execute_event.rb', line 11 def { event: "cassie.cql.execution", duration: duration.round(1), query: statement, consistency: consistency.upcase }.extend(Inspector) end |