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
base: trunk
from

Conversation

Projects
None yet
2 participants
@tpeyrard

tpeyrard commented Jun 24, 2016

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

Thomas Peyrard Thomas Peyrard
In order to measure time to first byte for JDBC sampler:
- 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

This comment has been minimized.

Show comment
Hide comment
@tpeyrard

tpeyrard Jun 24, 2016

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

tpeyrard commented Jun 24, 2016

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

Show outdated Hide outdated ...otocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java
/**
* 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 {

This comment has been minimized.

@FSchumacher

FSchumacher Jun 29, 2016

Contributor

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.

@FSchumacher

FSchumacher Jun 29, 2016

Contributor

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.

This comment has been minimized.

@tpeyrard

tpeyrard Jun 29, 2016

Ok I'll have a look

@tpeyrard

tpeyrard Jun 29, 2016

Ok I'll have a look

@FSchumacher

This comment has been minimized.

Show comment
Hide comment
@FSchumacher

FSchumacher Jun 29, 2016

Contributor

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

Contributor

FSchumacher commented Jun 29, 2016

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

@tpeyrard

This comment has been minimized.

Show comment
Hide comment
@tpeyrard

tpeyrard 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

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

Thomas Peyrard Thomas Peyrard
Clean the exceptions thrown by execute methods: remove the Unsupporte…
…dEncodingException because the IOException is more general.

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

This comment has been minimized.

Show comment
Hide comment
@tpeyrard

tpeyrard Jul 13, 2016

Hello,

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

Thanks

tpeyrard commented Jul 13, 2016

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

This comment has been minimized.

Show comment
Hide comment
@FSchumacher

FSchumacher Jul 13, 2016

Contributor

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

Contributor

FSchumacher commented Jul 13, 2016

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