Class: Karafka::Web::Management::Migrations::IntroduceLagTotalInStates

Inherits:
Base
  • Object
show all
Defined in:
lib/karafka/web/management/migrations/1706607960_introduce_lag_total_in_states.rb

Overview

Moves to using lag total as a normalization for both lags

Instance Method Summary collapse

Methods inherited from Base

applicable?, index, migrate, sorted_descendants

Instance Method Details

#migrate(state) ⇒ Object

Parameters:

  • state (Hash)


13
14
15
16
17
# File 'lib/karafka/web/management/migrations/1706607960_introduce_lag_total_in_states.rb', line 13

def migrate(state)
  state[:stats][:lag_total] = state[:stats][:lag_stored]
  state[:stats].delete(:lag)
  state[:stats].delete(:lag_stored)
end