class JoobQ::QueueMetrics
- JoobQ::QueueMetrics
- Reference
- Object
Overview
Represents a class to handle queue metrics
Included Modules
Defined in:
joobq/queue_metrics.crConstructors
- .instance : QueueMetrics
-
.new(instance_id : String = System.hostname)
Initialize with a Redis client and unique instance ID
Instance Method Summary
-
#aggregate_metrics(queue_name : String) : Hash(String, Int64 | Float64)
Aggregate metrics across all instances for a particular queue
-
#all_queue_metrics : Hash(String, Hash(String, String))
Modify this method to return a Hash instead of an Array
-
#collect_and_store_metrics
Collect and store queue metrics into Redis
-
#global_metrics : Hash(String, Float64 | Int64)
Aggregate metrics across all queues into a single hash
-
#queue_metrics(queue_name : String) : Hash(String, String)
Retrieve metrics for a specific queue
Instance methods inherited from module JoobQ::MetricsProvider
global_metrics : Hash(String, Int64 | Float64)
global_metrics
Constructor Detail
def self.new(instance_id : String = System.hostname)
#
Initialize with a Redis client and unique instance ID
Instance Method Detail
def aggregate_metrics(queue_name : String) : Hash(String, Int64 | Float64)
#
Aggregate metrics across all instances for a particular queue
def all_queue_metrics : Hash(String, Hash(String, String))
#
Modify this method to return a Hash instead of an Array
def global_metrics : Hash(String, Float64 | Int64)
#
Aggregate metrics across all queues into a single hash
def queue_metrics(queue_name : String) : Hash(String, String)
#
Retrieve metrics for a specific queue