Sha256: 9a1d2c9a5b64c73a26c1ec19ab141c1357e9b063fbbef776fea59df7f2be2e55

Contents?: true

Size: 511 Bytes

Versions: 8

Compression:

Stored size: 511 Bytes

Contents

module Steep
  module Drivers
    module Utils
      class JobsOption
        attr_accessor :jobs_count, :steep_command, :jobs_count_modifier

        include Parallel::ProcessorCount

        def initialize(jobs_count_modifier: 0)
          @jobs_count_modifier = jobs_count_modifier
        end

        def default_jobs_count
          physical_processor_count + jobs_count_modifier
        end

        def jobs_count_value
          jobs_count || default_jobs_count
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
steep-1.4.0.dev.4 lib/steep/drivers/utils/jobs_option.rb
steep-1.4.0.dev.3 lib/steep/drivers/utils/jobs_option.rb
steep-1.3.2 lib/steep/drivers/utils/jobs_option.rb
steep-1.3.1 lib/steep/drivers/utils/jobs_option.rb
steep-1.4.0.dev.2 lib/steep/drivers/utils/jobs_option.rb
steep-1.4.0.dev.1 lib/steep/drivers/utils/jobs_option.rb
steep-1.3.0 lib/steep/drivers/utils/jobs_option.rb
steep-1.3.0.pre.2 lib/steep/drivers/utils/jobs_option.rb