Class: Lich::Common::ShutdownScriptDrain::Result

Inherits:
Struct
  • Object
show all
Defined in:
documented/common/shutdown_script_drain.rb

Overview

Script shutdown drain metrics and remaining-script detail.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#remaining_scriptsObject

Returns the value of attribute remaining_scripts

Returns:

  • (Object)

    the current value of remaining_scripts



25
26
27
# File 'documented/common/shutdown_script_drain.rb', line 25

def remaining_scripts
  @remaining_scripts
end

#scripts_remainingObject

Returns the value of attribute scripts_remaining

Returns:

  • (Object)

    the current value of scripts_remaining



25
26
27
# File 'documented/common/shutdown_script_drain.rb', line 25

def scripts_remaining
  @scripts_remaining
end

#scripts_startedObject

Returns the value of attribute scripts_started

Returns:

  • (Object)

    the current value of scripts_started



25
26
27
# File 'documented/common/shutdown_script_drain.rb', line 25

def scripts_started
  @scripts_started
end

#slow_script_thresholdObject

Returns the value of attribute slow_script_threshold

Returns:

  • (Object)

    the current value of slow_script_threshold



25
26
27
# File 'documented/common/shutdown_script_drain.rb', line 25

def slow_script_threshold
  @slow_script_threshold
end

#slow_scriptsObject

Returns the value of attribute slow_scripts

Returns:

  • (Object)

    the current value of slow_scripts



25
26
27
# File 'documented/common/shutdown_script_drain.rb', line 25

def slow_scripts
  @slow_scripts
end

Instance Method Details

#detailsString

Formats the shutdown drain result for the existing shutdown trace log.

Returns:



36
37
38
39
40
41
42
# File 'documented/common/shutdown_script_drain.rb', line 36

def details
  "scripts_started=#{scripts_started} " \
    "slow_script_threshold=#{format('%.3f', slow_script_threshold)}s " \
    "slow_scripts=#{slow_scripts.inspect} " \
    "scripts_remaining=#{scripts_remaining} " \
    "remaining_scripts=#{remaining_scripts.inspect}"
end