class Gladys::Actions::Base

def current_database_size

def current_database_size
  @database.select(Sequel.function(:pg_database_size,
                                   Sequel.function(:current_database))).first[:pg_database_size]
end

def initialize(script, database)

def initialize(script, database)
  @script = script
  @database = database
  @context = Context.new(@script, @database)
end

def invoke(action, threads:, should_stop: -> { true })

Returns an object containing the metrics of the run.

Only runs once by default.
Runs the action until the should_stop block returns true.
def invoke(action, threads:, should_stop: -> { true })
  @context.run_action(action, threads: threads, should_stop: should_stop)
end

def report

def report
  {}
end