Sha256: b84b8ab2a3aefc72c8a1f24b3129e71356ff5cbd44f6ff4a07040986ea5d9382

Contents?: true

Size: 596 Bytes

Versions: 33

Compression:

Stored size: 596 Bytes

Contents

require_relative './network_condition'

Puppeteer::NETWORK_CONDITIONS = {
  'Slow 3G' => Puppeteer::NetworkCondition.new(
    download: ((500 * 1000) / 8) * 0.8,
    upload: ((500 * 1000) / 8) * 0.8,
    latency: 400 * 5,
  ),
  'Fast 3G' => Puppeteer::NetworkCondition.new(
    download: ((1.6 * 1000 * 1000) / 8) * 0.9,
    upload: ((750 * 1000) / 8) * 0.9,
    latency: 150 * 3.75,
  ),
}

module Puppeteer::NetworkConditions
  module_function def slow_3g
    Puppeteer::NETWORK_CONDITIONS['Slow 3G']
  end

  module_function def fast_3g
    Puppeteer::NETWORK_CONDITIONS['Fast 3G']
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
puppeteer-ruby-0.45.6 lib/puppeteer/network_conditions.rb
puppeteer-ruby-0.45.5 lib/puppeteer/network_conditions.rb
puppeteer-ruby-0.45.4 lib/puppeteer/network_conditions.rb
puppeteer-ruby-0.45.3 lib/puppeteer/network_conditions.rb
puppeteer-ruby-0.45.2 lib/puppeteer/network_conditions.rb
puppeteer-ruby-0.45.2.alpha2 lib/puppeteer/network_conditions.rb
puppeteer-ruby-0.45.2.alpha1 lib/puppeteer/network_conditions.rb
puppeteer-ruby-0.45.1 lib/puppeteer/network_conditions.rb
puppeteer-ruby-0.45.0 lib/puppeteer/network_conditions.rb
puppeteer-ruby-0.44.3 lib/puppeteer/network_conditions.rb
puppeteer-ruby-0.44.2 lib/puppeteer/network_conditions.rb
puppeteer-ruby-0.44.1 lib/puppeteer/network_conditions.rb
puppeteer-ruby-0.44.0 lib/puppeteer/network_conditions.rb
puppeteer-ruby-0.43.1 lib/puppeteer/network_conditions.rb
puppeteer-ruby-0.43.0 lib/puppeteer/network_conditions.rb
puppeteer-ruby-0.42.0 lib/puppeteer/network_conditions.rb
puppeteer-ruby-0.41.0 lib/puppeteer/network_conditions.rb
puppeteer-ruby-0.40.7 lib/puppeteer/network_conditions.rb
puppeteer-ruby-0.40.6 lib/puppeteer/network_conditions.rb
puppeteer-ruby-0.40.5 lib/puppeteer/network_conditions.rb