0

I'm doing a perf test to analyze the performance of a application which uses the MongoDB. The application is written in java and it uses the MongoDB java driver to connect to cloud MongoDB instance.

I want specifically to analyze the performance of the following code line.

collection.find(parseSearchQueryDirect(searchQuery)).skip(start).limit(offset);

So, I need to trace the network latency, connect time and actual query processing time for the above code line.

Is there a way to do this with mongoDB java driver or using any other tool??

1 Answer 1

1

Look at this.

actual query processing time for the above code line.

Command Monitoring section.

connect time

Connection Pool Monitoring section.

network latency

Cluster Monitoring section. NOTE: In ClusterDescriptionChangedEvent and in turns in newDescription you can see getServerDescriptions that will provide the current state of the used servers each of them in particularly will include roundTripTimeNanos that will mean average latency (RTT).

Sign up to request clarification or add additional context in comments.

2 Comments

it seems in the command monitoring it shows the total time, including network latency. what I need is the actual time taken for processing the query in mongoDB server side.
then you can see it only in the server logs

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.