sessionm-cassandra_object 2.2.18 → 2.2.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@ module CassandraObject
|
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
module ClassMethods
|
5
5
|
def find(key)
|
6
|
-
if parse_key(key) && attributes = connection.get(column_family, key)
|
6
|
+
if parse_key(key) && attributes = ActiveSupport::Notifications.instrument("get.cassandra_object", column_family: column_family, key: key) { connection.get(column_family, key) }
|
7
7
|
instantiate(key, attributes)
|
8
8
|
else
|
9
9
|
raise CassandraObject::RecordNotFound
|
@@ -1,5 +1,11 @@
|
|
1
1
|
module CassandraObject
|
2
2
|
class LogSubscriber < ActiveSupport::LogSubscriber
|
3
|
+
def get(event)
|
4
|
+
name = '%s get (%.1fms)' % [event.payload[:column_family], event.duration]
|
5
|
+
|
6
|
+
debug " #{name} #{event.payload[:key]}"
|
7
|
+
end
|
8
|
+
|
3
9
|
def multi_get(event)
|
4
10
|
name = '%s multi_get (%.1fms)' % [event.payload[:column_family], event.duration]
|
5
11
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 2
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 2.2.
|
8
|
+
- 20
|
9
|
+
version: 2.2.20
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Michael Koziarski
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-08-
|
19
|
+
date: 2011-08-16 00:00:00 -04:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|