Sha256: 9cbf8a9de723d684ae5d4eef88b93c717fe732a79d6881cc855b758ff0062cc2

Contents?: true

Size: 495 Bytes

Versions: 7

Compression:

Stored size: 495 Bytes

Contents

#!/usr/local/bin/ruby -w

$LOAD_PATH.unshift("../lib")

require 'madeleine'
require 'batched'

class BenchmarkCommand
  def initialize(value)
    @value = value
  end

  def execute(system)
    # do nothing
  end
end

madeleine = BatchedSnapshotMadeleine.new("benchmark-base") { :the_system }

RUNS = 2000

GC.start
GC.disable

t0 = Time.now
RUNS.times {
  madeleine.execute_command(BenchmarkCommand.new(1234))
}
t1 = Time.now

GC.enable

tps = RUNS/(t1 - t0)

puts "#{tps.to_i} transactions/s"

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
madeleine-0.9.0 contrib/benchmark.rb
madeleine-0.9.0.pre contrib/benchmark.rb
madeleine-0.8.0 contrib/benchmark.rb
madeleine-0.8.0.pre contrib/benchmark.rb
madeleine-0.7.2 contrib/benchmark.rb
madeleine-0.7.3 contrib/benchmark.rb
madeleine-0.7.1 contrib/benchmark.rb