Sha256: 7c0359982eaf3b1fb077bbafe54fb374a2bf941079dd93029010c6dfaeb32c31

Contents?: true

Size: 594 Bytes

Versions: 23

Compression:

Stored size: 594 Bytes

Contents

require 'rubygems'

$LOAD_PATH.unshift("xampl_generated_code")

require 'TokyoCabinetExperimental'

Xampl.set_default_persister_kind(:tokyo_cabinet)
Xampl.set_default_persister_format(:xml_format)

module TokyoCabinetExperimental

  start = Time.now
  people = nil

  Xampl.transaction("setup") do
    people = People['people']
  end

  loop_start = Time.now

  total = 0
  people.person.each do | person |
    age = person.age.to_i
    total += age
  end

  done = Time.now

  puts "Total age: #{ total }"
  puts "done: #{ done - start }:: #{ loop_start - start} + #{ done - loop_start}"

end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
hutch-xamplr-1.0.0 examples/tokyo-cabinet-experimental/expt-reader.rb
hutch-xamplr-1.0.1 examples/tokyo-cabinet-experimental/expt-reader.rb
hutch-xamplr-1.0.2 examples/tokyo-cabinet-experimental/expt-reader.rb
hutch-xamplr-1.0.3 examples/tokyo-cabinet-experimental/expt-reader.rb
hutch-xamplr-1.0.4 examples/tokyo-cabinet-experimental/expt-reader.rb
hutch-xamplr-1.0.5 examples/tokyo-cabinet-experimental/expt-reader.rb
hutch-xamplr-1.1.0 examples/tokyo-cabinet-experimental/expt-reader.rb
hutch-xamplr-1.1.1 examples/tokyo-cabinet-experimental/expt-reader.rb
hutch-xamplr-1.1.2 examples/tokyo-cabinet-experimental/expt-reader.rb
hutch-xamplr-1.1.4 examples/tokyo-cabinet-experimental/expt-reader.rb
hutch-xamplr-1.2.0 examples/tokyo-cabinet-experimental/expt-reader.rb
hutch-xamplr-1.3.0 examples/tokyo-cabinet-experimental/expt-reader.rb
hutch-xamplr-1.3.1 examples/tokyo-cabinet-experimental/expt-reader.rb
hutch-xamplr-1.3.10 examples/tokyo-cabinet-experimental/expt-reader.rb
hutch-xamplr-1.3.11 examples/tokyo-cabinet-experimental/expt-reader.rb
hutch-xamplr-1.3.12 examples/tokyo-cabinet-experimental/expt-reader.rb
hutch-xamplr-1.3.13 examples/tokyo-cabinet-experimental/expt-reader.rb
hutch-xamplr-1.3.14 examples/tokyo-cabinet-experimental/expt-reader.rb
hutch-xamplr-1.3.3 examples/tokyo-cabinet-experimental/expt-reader.rb
hutch-xamplr-1.3.8 examples/tokyo-cabinet-experimental/expt-reader.rb