:play moviesstatement in the Neo4j browser. Then we can get and build the application and run it. To test that it works, open the app in your browser at http://localhost:8080
git clone http://github.com/neo4j-contrib/developer-resources cd developer-resources/language-guides/java/jdbc mvn compile exec:java -DmainClass="org.neo4j.example.movies.Movies"
Setup with XRebel
To use XRebel we just download it, get an eval license and attach the jar as a java-agent to our application. MAVEN_OPTS=”-javaagent:$HOME/Downloads/xrebel/xrebel.jar” mvn compile exec:java -DmainClass=”org.neo4j.example.movies.Movies” If we check our example application page again, we see a small green XRebel icon in the left corner. It provides access to the XRebel UI which has tabs for application performance, database queries, exceptions and more.
For our initial query for the “Matrix” movie, it shows both the request time for the web-application, as well as the database calls to Neo4j. Interestingly both the JDBC level as well as the underlying http calls to Neo4j are displayed.
If we uglify our app, that our queries are executed incorrectly, simulating a n+1 select, then that shows clearly up in XRebel as massive database interaction.
Runtime Exceptions due to a programming error are also made immediately accessible from the XRebel UI.
For non-visual REST-services you can access the same profiling information via a special endpoint that is added to your application, in our case: http://localhost:8080/xrebel
As you can see, XRebel can give you quick insights in the performance profile of your Neo4j backed application and highlights which queries / pages / secondary requests need further optimization.