Sha256: c3e3bb48c0ca71cb32ef75a4851df0937ed5c7657052d2f336c6ff22cedbedff

Contents?: true

Size: 905 Bytes

Versions: 106

Compression:

Stored size: 905 Bytes

Contents

require 'viiite'
require 'msgpack'

data_plain = { 'message' => '127.0.0.1 - - [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326 "http://www.example.com/start.html" "Mozilla/4.08 [en] (Win98; I ;Nav)"' }
data_structure = {
  'remote_host' => '127.0.0.1',
  'remote_user' => '-',
  'date' => '10/Oct/2000:13:55:36 -0700',
  'request' => 'GET /apache_pb.gif HTTP/1.0',
  'method' => 'GET',
  'path' => '/apache_pb.gif',
  'protocol' => 'HTTP/1.0',
  'status' => 200,
  'bytes' => 2326,
  'referer' => 'http://www.example.com/start.html',
  'agent' => 'Mozilla/4.08 [en] (Win98; I ;Nav)',
}

Viiite.bench do |b|
  b.range_over([10_000, 100_000, 1000_000], :runs) do |runs|
    b.report(:plain) do
      runs.times do
        MessagePack.pack(data_plain)
      end
    end

    b.report(:structure) do
      runs.times do
        MessagePack.pack(data_structure)
      end
    end
  end
end

Version data entries

106 entries across 106 versions & 3 rubygems

Version Path
msgpack-1.5.3 bench/pack_log.rb
msgpack-1.5.2 bench/pack_log.rb
msgpack-1.5.1 bench/pack_log.rb
msgpack-1.5.0 bench/pack_log.rb
msgpack-1.4.5 bench/pack_log.rb
msgpack-1.4.4 bench/pack_log.rb
msgpack-1.4.3 bench/pack_log.rb
msgpack-1.4.2 bench/pack_log.rb
msgpack-1.4.0.pre1 bench/pack_log.rb
msgpack-1.3.3-x64-mingw32 bench/pack_log.rb
msgpack-1.3.3-x86-mingw32 bench/pack_log.rb
msgpack-1.3.3 bench/pack_log.rb
msgpack-1.3.2-x64-mingw32 bench/pack_log.rb
msgpack-1.3.2-x86-mingw32 bench/pack_log.rb
msgpack-1.3.2 bench/pack_log.rb
chatops-rpc-0.0.2 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/msgpack-1.3.1/bench/pack_log.rb
chatops-rpc-0.0.1 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/msgpack-1.3.1/bench/pack_log.rb
msgpack-1.3.1-x64-mingw32 bench/pack_log.rb
msgpack-1.3.1-x86-mingw32 bench/pack_log.rb
msgpack-1.3.1 bench/pack_log.rb