Sha256: a98053561a20ab4158db2349c6f17b20a3c88ca8a98f7442abe0967cf80f39cf

Contents?: true

Size: 716 Bytes

Versions: 34

Compression:

Stored size: 716 Bytes

Contents

require "rubygems"
require "bundler/setup"
require 'fileutils'
require 'neo4j'

#FileUtils.rm_rf Neo4j::Config[:storage_path]


class FooNode < Neo4j::Model
  property :user_id
  index :user_id
  has_n(:contacts)
  def to_s
    "FooNode #{user_id}"
  end
end

node1 = FooNode.create(:user_id => 1)

for x in 1..5 do
for node_id in 2..2700
#  node = FooNode.create(:user_id => node_id)
#  node.contacts << node1
#  node.save!

  found = FooNode.find_by_user_id(node_id)
  puts "Found #{found}"
#  Neo4j::Transaction.run do
#    found.del
#  end
  Neo4j::Rails::Model.close_lucene_connections
#  puts "node_id=#{node_id} #{node.contacts.include?(node1)}" #if (node_id % 50) == 2
end
end
puts "FINISHED"
Neo4j.shutdown

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
neo4j-2.0.1-java lib/perf.rb~
neo4j-2.0.0-java lib/perf.rb~
neo4j-2.0.0.rc2-java lib/perf.rb~
neo4j-2.0.0.rc1-java lib/perf.rb~
neo4j-2.0.0.alpha.9-java lib/perf.rb~
neo4j-2.0.0.alpha.8-java lib/perf.rb~
neo4j-2.0.0.alpha.7-java lib/perf.rb~
neo4j-2.0.0.alpha.6-java lib/perf.rb~
neo4j-2.0.0.alpha.5-java lib/perf.rb~
neo4j-2.0.0.alpha.4-java lib/perf.rb~
neo4j-1.3.1-java lib/perf.rb~
neo4j-1.3.0-java lib/perf.rb~
neo4j-1.2.6-java lib/perf.rb~
neo4j-1.2.5-java lib/perf.rb~
neo4j-1.2.4-java lib/perf.rb~
neo4j-1.2.3-java lib/perf.rb~
neo4j-1.2.2-java lib/perf.rb~
neo4j-1.2.1-java lib/perf.rb~
neo4j-1.2.0-java lib/perf.rb~
neo4j-1.1.4-java lib/perf.rb~