Class: Temporalio::Worker::Tuner::ResourceBasedTunerOptions

Inherits:
Data
  • Object
show all
Defined in:
lib/temporalio/worker/tuner.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#target_cpu_usageObject (readonly)

Returns the value of attribute target_cpu_usage

Returns:

  • (Object)

    the current value of target_cpu_usage



236
237
238
239
# File 'lib/temporalio/worker/tuner.rb', line 236

ResourceBasedTunerOptions = Data.define(
  :target_memory_usage,
  :target_cpu_usage
)

#target_memory_usageObject (readonly)

Returns the value of attribute target_memory_usage

Returns:

  • (Object)

    the current value of target_memory_usage



236
237
238
239
# File 'lib/temporalio/worker/tuner.rb', line 236

ResourceBasedTunerOptions = Data.define(
  :target_memory_usage,
  :target_cpu_usage
)

Instance Method Details

#target_cpu_usage=(value) ⇒ Float (readonly)

Returns A value between 0 and 1 that represents the target (system) CPU usage. This can be set to 1.0 if desired, but it’s recommended to leave some headroom for other processes.

Returns:

  • (Float)

    A value between 0 and 1 that represents the target (system) CPU usage. This can be set to 1.0 if desired, but it’s recommended to leave some headroom for other processes.



236
237
238
239
# File 'lib/temporalio/worker/tuner.rb', line 236

ResourceBasedTunerOptions = Data.define(
  :target_memory_usage,
  :target_cpu_usage
)

#target_memory_usage=(value) ⇒ Float (readonly)

Returns A value between 0 and 1 that represents the target (system) memory usage. It’s not recommended to set this higher than 0.8, since how much memory a workflow may use is not predictable, and you don’t want to encounter OOM errors.

Returns:

  • (Float)

    A value between 0 and 1 that represents the target (system) memory usage. It’s not recommended to set this higher than 0.8, since how much memory a workflow may use is not predictable, and you don’t want to encounter OOM errors.



236
237
238
239
# File 'lib/temporalio/worker/tuner.rb', line 236

ResourceBasedTunerOptions = Data.define(
  :target_memory_usage,
  :target_cpu_usage
)