class Riak::Client
Public Instance Methods
buckets(options = {}, &blk)
click to toggle source
# File lib/patches/db/riak.rb, line 23 def buckets(options = {}, &blk) profile("buckets #{options}") { buckets_without_profiling(options, &blk) } end
Also aliased as: buckets_without_profiling
clear_bucket_props(bucket, options = {})
click to toggle source
# File lib/patches/db/riak.rb, line 83 def clear_bucket_props(bucket, options = {}) profile("clear_bucket_props bucket=#{bucket.name} options=#{options}") { clear_bucket_props_without_profiling(bucket, options) } end
Also aliased as: clear_bucket_props_without_profiling
client_id()
click to toggle source
# File lib/patches/db/riak.rb, line 28 def client_id profile("client_id") { client_id_without_profiling } end
Also aliased as: client_id_without_profiling
delete_object(bucket, key, options = {})
click to toggle source
# File lib/patches/db/riak.rb, line 33 def delete_object(bucket, key, options = {}) profile("delete_object bucket=#{bucket.name} key=#{key} options=#{options}") { delete_object_without_profiling(bucket, key, options) } end
Also aliased as: delete_object_without_profiling
get_bucket_props(bucket, options = {})
click to toggle source
# File lib/patches/db/riak.rb, line 38 def get_bucket_props(bucket, options = {}) profile("get_bucket_props bucket=#{bucket.name} options=#{options}") { get_bucket_props_without_profiling(bucket, options) } end
Also aliased as: get_bucket_props_without_profiling
get_index(bucket, index, query, options = {})
click to toggle source
# File lib/patches/db/riak.rb, line 43 def get_index(bucket, index, query, options = {}) profile("get_index bucket=#{bucket.name} index=#{index} query=#{query} options=#{options}") { get_index_without_profiling(bucket, index, query, options) } end
Also aliased as: get_index_without_profiling
get_object(bucket, key, options = {})
click to toggle source
# File lib/patches/db/riak.rb, line 53 def get_object(bucket, key, options = {}) profile("get_object bucket=#{bucket.name} key=#{key} options=#{options}") { get_object_without_profiling(bucket, key, options) } end
Also aliased as: get_object_without_profiling
get_preflist(bucket, key, type = nil, options = {})
click to toggle source
# File lib/patches/db/riak.rb, line 48 def get_preflist(bucket, key, type = nil, options = {}) profile("get_preflist bucket=#{bucket.name} key=#{key} type=#{type} options=#{options}") { get_preflist_without_profiling(bucket, key, type, options) } end
Also aliased as: get_preflist_without_profiling
list_keys(bucket, options = {}, &block)
click to toggle source
# File lib/patches/db/riak.rb, line 58 def list_keys(bucket, options = {}, &block) profile("list_keys bucket=#{bucket.name} options=#{options}") { list_keys_without_profiling(bucket, options, &block) } end
Also aliased as: list_keys_without_profiling
mapred(mr, &block)
click to toggle source
# File lib/patches/db/riak.rb, line 63 def mapred(mr, &block) profile("mapred") { mapred_without_profiling(mr, &block) } end
Also aliased as: mapred_without_profiling
ping()
click to toggle source
# File lib/patches/db/riak.rb, line 68 def ping profile("ping") { ping_without_profiling } end
Also aliased as: ping_without_profiling
reload_object(object, options = {})
click to toggle source
# File lib/patches/db/riak.rb, line 73 def reload_object(object, options = {}) profile("reload_object bucket=#{object.bucket.name} key=#{object.key} vclock=#{object.vclock} options=#{options}") { reload_object_without_profiling(object, options) } end
Also aliased as: reload_object_without_profiling
set_bucket_props(bucket, properties, type = nil)
click to toggle source
# File lib/patches/db/riak.rb, line 78 def set_bucket_props(bucket, properties, type = nil) profile("set_bucket_props bucket=#{bucket.name} type=#{type}") { set_bucket_props_without_profiling(bucket, properties, type) } end
Also aliased as: set_bucket_props_without_profiling
store_object(object, options = {})
click to toggle source
# File lib/patches/db/riak.rb, line 88 def store_object(object, options = {}) profile("store_object bucket=#{object.bucket.name} key=#{object.key} vclock=#{object.vclock} options=#{options}") { store_object_without_profiling(object, options) } end
Also aliased as: store_object_without_profiling
Private Instance Methods
profile(request) { || ... }
click to toggle source
# File lib/patches/db/riak.rb, line 94 def profile(request, &blk) return yield unless SqlPatches.should_measure? start = Process.clock_gettime(Process::CLOCK_MONOTONIC) result = yield elapsed_time = SqlPatches.elapsed_time(start) record = ::Rack::MiniProfiler.record_sql(request, elapsed_time) result end