Sha256: 031d192378fe0d83f5075dd93de4179a5b8291ea36272c5fb23883999ffae5ef
Contents?: true
Size: 763 Bytes
Versions: 14
Compression:
Stored size: 763 Bytes
Contents
require "spec_helper" require "rack/test/uploaded_file" require "benchmark" describe "ActiveMetadata" do before(:each) do @document = Document.create! { |d| d.name = "John" } @document.reload end context "running on mongo" do # it "should insert xxx notes" do # notes = 1000000 # result = [] # Benchmark.bm do |x| # x.report do # notes.times do |i| # start = Time.now # @document.create_note_for(:name, "Note number #{i}") # result.push Time.now - start # end # end # end # puts "Total = #{result.sum}" # puts "Average = #{result.sum / notes}" # @document.notes_for(:name).count.should eq notes # end end end
Version data entries
14 entries across 14 versions & 1 rubygems