-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Driver Performance #1185
Comments
Hi Team, if you could please give some indication here - that'd be appreciated |
Hi @Sydney-o9, the internal timings in the driver are not exposed, but you can troubleshooting by check: import neo4j from 'neo4j-driver'
const mydbname = "the database name, usually 'neo4j'"
const driver = neo4j.driver(...)
// Check the timing for this request
// This one should just bootstrap the driver and do a handshake with the database
await driver.getServerInfo({ database: mydbname })
// Measure the time for running the query
const { records, summary } = await driver.executeQuery(query, params, { database: mydbname }) You an also check in the |
Could you inform also the NodeJS version, Driver version, Database version and some snippet to see what you're doing? |
The time measures reported in the The driver itself take some work to bootstrap, so if you are creating a driver for each request, you will might have issues. Setting the database name in the session creation is highly recommend in the environments with high latency, since when the database name is not set, the driver will take an extra round trip to resolve the database name. In Aura, the database name is const session = this.driver.session({ database: 'neo4j' }) The first request might get a bit more time because the driver will fetch the cluster formation before trigger the first query, but the next requests should be faster. |
We are Neo4j cloud users and are measuring performance using Sentry.
Our backend application simply leverages the
neo4j-javascript-driver
to make calls to our Neo4j cloud db.It takes almost 750ms for the driver to initialise and fulfil the request
I'm looking for ways to improve this, ideally would like to know how long it takes for:
Overall, I found the driver to be slow, but I have no proof, I want to measure this.
Can you give us ways to assess the performance of the driver in our application?
The text was updated successfully, but these errors were encountered: