Skip to content
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

Measure Time to First byte in JDBCSampler #211

Closed
wants to merge 2 commits into from

Conversation

tpeyrard
Copy link

Hello,

I use JMeter to measure performance of a database. When executing queries returning a lot of rows, the time taken by JMeter to read the ResultSet and storing the result in a StringBuilder then calling toString() might be bigger than the execution time on the server.

In order to easily understand what's taking time for slow queries, I thought it might be interesting to use "Latency" and "Connect Time" of the SampleResult to show two informations:

  • Connect time: time needed to establish the connection (previously it was in the Latency)
  • Latency: time taken to get the first ResultSet (TTFB) (or whatever if it's a statement returning something else)

What do you think of that change?

Regards,
Thomas

- Use connect time to instead of latency to measure connection time
- Use latency to measure the time at which the first ResultSet (or whatever) is received from the connection
@tpeyrard
Copy link
Author

I'm not sure the failing build is related to my commit. I had the error before my change.
Thomas

/**
* Use the sample given as argument to set time to first byte in the "latency" field of the SampleResult.
*/
protected byte[] execute(Connection conn, SampleResult sample) throws SQLException, IOException {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The javadoc could (should) have documentation for the params, return value, ...
It looks a bit strange, that execute(conn) throws UnsupportedOperationException, but this method does not.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I'll have a look

@FSchumacher
Copy link
Contributor

The SNI test is quite flaky, but as you suspected, that is not your fault.

@tpeyrard
Copy link
Author

tpeyrard commented Jul 4, 2016

Hello,

do you know why I'm not able to retrieve log apache dependencies ?
apache dep issue

ant download_jars is successful and ant install too. Is the issue related to IntelliJ?

Thanks

…dEncodingException because the IOException is more general.

 Add javadoc for execute method taking a sample as argument.
@tpeyrard
Copy link
Author

Hello,

I couldn't figure out whether the job fails because of my changes or not. Any idea?

Thanks

@asfgit asfgit closed this in 2e27dfe Jul 13, 2016
@FSchumacher
Copy link
Contributor

The jobs fail because of the flaky sni test. They are not your fault. Thanks for the contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants