class CrystalTask::Metrics::Redis

Defined in:

crystal_task/metrics/redis.cr

Constructors

Instance Method Summary

Instance methods inherited from class CrystalTask::Metrics::Base

counts(metrics : Array(String)) : Hash(String, Int64) counts, decr(metric : String) decr, get_count(metric : String) : String | Nil get_count, incr(metrics : Array(String)) incr

Constructor Detail

def self.new(hostname : String = ENV.fetch("REDIS_HOST", "127.0.0.1"), pool_size : Int64 = (ENV.fetch("REDIS_POOL_SIZE", (System.cpu_count > 5 ? System.cpu_count : 5).to_s)).to_i64) #

[View source]

Instance Method Detail

def counts(metrics : Array(String)) : Hash(String, Int64) #

[View source]
def decr(metric : String) #

[View source]
def get_count(metric : String) : String | Nil #

[View source]
def incr(metrics : Array(String)) #

[View source]
def pool : ::Redis::PooledClient #

[View source]