This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io.gatling.core.Predef._ | |
import io.gatling.core.scenario.Simulation | |
import io.gatling.http.Predef._ | |
import scala.concurrent.duration._ | |
class CreateNode extends Simulation { | |
val httpConf = http | |
.baseURL("http://localhost:7474") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
require 'uri' | |
# Set Java Home | |
unless ENV["JAVA_HOME"] | |
puts "You need to set your JAVA_HOME environment variable by running:" | |
javahome = `/usr/libexec/java_home` | |
command = "export JAVA_HOME=\"" + javahome.strip + "\"" | |
puts command | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.neo4j.server.rest.security; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.xml.bind.DatatypeConverter; | |
import java.util.StringTokenizer; | |
import java.io.UnsupportedEncodingException; | |
public class LockDownSecurityRule implements SecurityRule { | |
public static final String REALM = "WallyWorld"; // as per RFC2617 :-); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.neo4j.graphdb.Node; | |
import java.util.Comparator; | |
import java.util.Map; | |
/** | |
* @author mh | |
* @since 16.03.14 | |
*/ | |
public class MutableIntEntryComparator implements Comparator<Map.Entry<Node, MutableInt>> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Private inner class for sorting. | |
* | |
* @author dany | |
*/ | |
public final class MutableInt implements Comparable<MutableInt> { | |
public int value = 0; | |
public MutableInt(int value) { | |
this.value = value; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http/pipeline' | |
def runit | |
Net::HTTP.start 'localhost', 7474 do |http| | |
http.pipelining = true | |
reqs = [] | |
6000.times do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.neo4j.example.unmanagedextension; | |
import com.google.common.cache.CacheBuilder; | |
import com.google.common.cache.CacheLoader; | |
import com.google.common.cache.LoadingCache; | |
import org.codehaus.jackson.map.ObjectMapper; | |
import org.neo4j.graphdb.*; | |
import org.neo4j.helpers.collection.IteratorUtil; | |
import javax.ws.rs.GET; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.neo4j.example.unmanagedextension; | |
import org.codehaus.jackson.map.ObjectMapper; | |
import org.neo4j.cypher.javacompat.ExecutionEngine; | |
import org.neo4j.cypher.javacompat.ExecutionResult; | |
import org.neo4j.graphdb.*; | |
import org.neo4j.helpers.collection.IteratorUtil; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.Path; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe Neography::Rest do | |
before(:each) do | |
@neo = Neography::Rest.new | |
end | |
describe "the spatial plugin works" do | |
it "better work" do | |
node = @neo.create_node({:lat => 60.1, :lon => 15.2}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Maxs-MacBook-Pro-2:neography maxdemarzi$ ruby transaction_test.rb | |
2014-01-23 16:45:47 -0600 | |
2014-01-23 16:45:47 -0600 start | |
Error deleting: Neography::NotFoundException | |
2014-01-23 16:45:54 -0600 | |
all nodes deleted | |
2014-01-23 16:45:54 -0600 | |
creating nodes | |
2014-01-23 16:45:54 -0600 | |
2014-01-23 16:45:54 -0600 tx start |