Class: Amigo::Autoscaler::Checker

Inherits:
Object
  • Object
show all
Defined in:
lib/amigo/autoscaler.rb

Instance Method Summary collapse

Instance Method Details

#get_latenciesHash

Return relevant latencies for this checker. This could be the latencies of each Sidekiq queue, or web latencies, etc. If this is a pool usage checker only, return {}.

Returns:

  • (Hash)

    Key is the queue name (or some other value); value is the latency in seconds.

Raises:

  • (NotImplementedError)


252
# File 'lib/amigo/autoscaler.rb', line 252

def get_latencies = raise NotImplementedError

#get_pool_usagenil, Float

Return the pool usage for this checker. Values should be between 0 and 1, with values over 1 meaning a backlog. If this is a latency checker only, or there is not enough information to report on pool usage, return nil.

Returns:

  • (nil, Float)

Raises:

  • (NotImplementedError)


258
# File 'lib/amigo/autoscaler.rb', line 258

def get_pool_usage = raise NotImplementedError