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

Bolt Sampler - Neo4j 4.x and cluster features #638

Closed
wants to merge 15 commits into from

Conversation

pecollet
Copy link
Contributor

@pecollet pecollet commented Dec 15, 2020

Description

Bolt Sampler :

  • added "database" option, required for Neo4j 4.x multi-database support
  • added "access mode" option, that allows running against a Neo4j Enterprise causal cluster, with proper query routing using the "neo4://" or "bolt+routing://" URL schemes.
  • added "transaction timeout" option, which is a useful parameter when load testing
  • fixed error displaying results when "Record Query Results" is enabled, with 4.x Driver (retrieving resultSummary caused early consumption of results).

Motivation and Context

Enables running JMeter against Neo4j 4.0, 4.1 & 4.2.
Enables running JMeter against Neo4j Enterprise Causal clusters
Enables setting a limit on request execution time.

How Has This Been Tested?

Tested against : 3.5 standalone Neo4j instance, 3.5 Causal Cluster, 4.2 standalone Neo4j instance, 4.2 Causal Cluster.
Test config : 1 "Bolt Connection Configuration" + 1 "Bolt Request" in a Thread group

Screenshots (if appropriate):

Jmeter-bolt-sampler

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the [code style][style-guide] of this project.
  • I have updated the documentation accordingly.

database : required to address a on-default dtabase in Neo4j 4.x
accessMode : allow to test against a cluster w/o having all queries sent to the leader (previous was defaulting to WRITE)
- new tx timeout option
- fixed results consumption issue in 4.x
- separated options from query in UI + better descriptions
Copy link
Contributor

@FSchumacher FSchumacher left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. I think it will have to wait until the release 5.4.1, which should happen soon.

pecollet and others added 4 commits December 15, 2020 22:40
also removed time assertions that made some unit tests flaky
update to latest JMeter
Allows to specify a pool size larger than the default 100, which can become a bottleneck with large number of threads using a single Neo4j driver.
Also improve Bolt URI description to describe neo4j:// format.
@codecov-io
Copy link

codecov-io commented Jan 8, 2021

Codecov Report

Merging #638 (4515baf) into master (aa6c763) will increase coverage by 0.01%.
The diff coverage is 72.05%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #638      +/-   ##
============================================
+ Coverage     55.43%   55.45%   +0.01%     
- Complexity    10155    10163       +8     
============================================
  Files          1044     1044              
  Lines         64078    64127      +49     
  Branches       7250     7252       +2     
============================================
+ Hits          35524    35559      +35     
- Misses        26047    26061      +14     
  Partials       2507     2507              
Impacted Files Coverage Δ Complexity Δ
...er/protocol/bolt/config/BoltConnectionElement.java 12.19% <0.00%> (-2.10%) 4.00 <0.00> (ø)
...protocol/bolt/sampler/AbstractBoltTestElement.java 61.29% <42.85%> (-18.71%) 12.00 <5.00> (+6.00) ⬇️
...col/bolt/config/BoltConnectionElementBeanInfo.java 76.19% <100.00%> (+3.96%) 2.00 <0.00> (ø)
...ache/jmeter/protocol/bolt/sampler/BoltSampler.java 95.83% <100.00%> (+5.70%) 13.00 <1.00> (+3.00)
...l/bolt/sampler/BoltTestElementBeanInfoSupport.java 100.00% <100.00%> (ø) 2.00 <1.00> (+1.00)
...ter/protocol/http/proxy/SamplerCreatorFactory.java 27.90% <0.00%> (-13.96%) 4.00% <0.00%> (-1.00%)
...a/org/apache/jmeter/timers/PoissonRandomTimer.java 72.97% <0.00%> (-5.41%) 9.00% <0.00%> (-1.00%)
...ter/protocol/http/proxy/DefaultSamplerCreator.java 54.12% <0.00%> (-0.52%) 28.00% <0.00%> (-1.00%)
...va/org/apache/jmeter/visualizers/RequestPanel.java 66.66% <0.00%> (+3.25%) 5.00% <0.00%> (ø%)
...eter/protocol/tcp/sampler/BinaryTCPClientImpl.java 67.44% <0.00%> (+6.21%) 10.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aa6c763...47c180c. Read the comment docs.

@asfgit asfgit closed this in e7b9b84 Mar 12, 2021
asfgit pushed a commit that referenced this pull request Mar 12, 2021
@FSchumacher
Copy link
Contributor

Thanks for the PR. Can you test the next nightly or build from trunk?

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.

4 participants