Sha256: f399261064a512b19ff172a38bad0138250e7bacd35a5be4e63e3f123a5f4fd2

Contents?: true

Size: 678 Bytes

Versions: 12

Compression:

Stored size: 678 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

require 'English'
$LOAD_PATH << '.'
$LOAD_PATH << File.join(__dir__, '../lib')
$LOAD_PATH << File.join(__dir__, '../ext')

require 'oj'

Oj.default_options = { mode: :rails, cache_keys: false, cache_str: -1 }

def mem
  `ps -o rss= -p #{$PROCESS_ID}`.to_i
end

('a'..'z').each { |a|
  ('a'..'z').each { |b|
    ('a'..'z').each { |c|
      ('a'..'z').each { |d|
        ('a'..'z').each { |e|
          ('a'..'z').each { |f|
            key = "#{a}#{b}#{c}#{d}#{e}#{f}"
            Oj.load(%|{ "#{key}": 101}|)
            # Oj.dump(x)
          }
        }
      }
    }
    puts "#{a}#{b} #{mem}"
  }
}

Oj::Parser.new(:usual)

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
oj-3.16.9 test/mem.rb
oj-3.16.8 test/mem.rb
oj-3.16.7 test/mem.rb
oj-3.16.6 test/mem.rb
oj-3.16.5 test/mem.rb
oj-3.16.4 test/mem.rb
oj-3.16.3 test/mem.rb
oj-3.16.2 test/mem.rb
oj-3.16.1 test/mem.rb
oj-3.16.0 test/mem.rb
oj-3.15.1 test/mem.rb
oj-3.15.0 test/mem.rb