Sha256: 409a9da0010183cf0fa3d590cc84d9d1c8bd75c0b7ebea084f5bde4dbad54527

Contents?: true

Size: 400 Bytes

Versions: 1

Compression:

Stored size: 400 Bytes

Contents

# frozen_string_literal: true

require 'sidekiq/api'

class Metrics
  QueueStats = Struct.new(:name, :size, :latency)

  def initialize
    @overview_stats = Sidekiq::Stats.new
    @queues_stats = queues_stats
  end

  def __binding__
    binding
  end

  private

  def queues_stats
    Sidekiq::Queue.all.map do |queue|
      QueueStats.new(queue.name, queue.size, queue.latency)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sidekiq-prometheus-exporter-0.1.4 lib/sidekiq/prometheus/exporter/metrics.rb