Including jmeter to allow concurrent Store requests easily
This commit is contained in:
parent
0273e77c0f
commit
016941972d
11
README.md
11
README.md
|
@ -21,3 +21,14 @@ Simple script that allows to publish messages from different clients.
|
|||
Notice that the bash script expects two `nwaku` nodes that communicate through
|
||||
the _Relay_ protocol and the `nwaku_B` has the _Store_ protocol mounted and
|
||||
is connected to the `postgres_DB`.
|
||||
|
||||
### Docker
|
||||
|
||||
Contains a docker compose file with:
|
||||
- Two `nwaku` nodes configured with _Postgres_ and _SQLite_.
|
||||
- Grafana container to compare performance of both nodes.
|
||||
- Container with simple shell script that sends publish requests through rpc.
|
||||
- Two `nwaku` nodes configured as _Store_-clients and listening to REST requests.
|
||||
|
||||
Inside the _docker_ folder, we have a _jmeter_ test plan which is aimed for
|
||||
performing concurrent _Store_ REST requests to the _Store_-clients.
|
||||
|
|
|
@ -40,13 +40,30 @@ services:
|
|||
- *logging
|
||||
- *pg_env
|
||||
volumes:
|
||||
- ./run_node_postgres.sh:/opt/run_node_postgres.sh:Z
|
||||
- ./run_nwaku_store_postgres.sh:/opt/run_nwaku_store_postgres.sh:Z
|
||||
entrypoint: sh
|
||||
command:
|
||||
- /opt/run_node_postgres.sh
|
||||
- /opt/run_nwaku_store_postgres.sh
|
||||
depends_on:
|
||||
- postgres
|
||||
|
||||
nwaku_client_postgres:
|
||||
## Waku node that acts as a Store client to the `nwaku_postgres` and listens
|
||||
## to REST-Store requests
|
||||
image: statusteam/nim-waku:v0.19.0
|
||||
restart: on-failure
|
||||
ports:
|
||||
- 0.0.0.0:8645:8645/tcp
|
||||
<<:
|
||||
- *logging
|
||||
volumes:
|
||||
- ./run_nwaku_store_client_postgres.sh:/opt/run_nwaku_store_client_postgres.sh:Z
|
||||
entrypoint: sh
|
||||
command:
|
||||
- /opt/run_nwaku_store_client_postgres.sh
|
||||
depends_on:
|
||||
- nwaku_postgres
|
||||
|
||||
nwaku_sqlite:
|
||||
## Waku node with Store mounted & SQLite
|
||||
image: statusteam/nim-waku:v0.19.0
|
||||
|
@ -59,10 +76,27 @@ services:
|
|||
- *logging
|
||||
volumes:
|
||||
- ./data/sqlite:/data
|
||||
- ./run_node_sqlite.sh:/opt/run_node_sqlite.sh:Z
|
||||
- ./run_nwaku_store_sqlite.sh:/opt/run_nwaku_store_sqlite.sh:Z
|
||||
entrypoint: sh
|
||||
command:
|
||||
- /opt/run_node_sqlite.sh
|
||||
- /opt/run_nwaku_store_sqlite.sh
|
||||
|
||||
nwaku_client_sqlite:
|
||||
## Waku node that acts as a Store client to the `nwaku_sqlite` and listens
|
||||
## to REST-Store requests
|
||||
image: statusteam/nim-waku:v0.19.0
|
||||
restart: on-failure
|
||||
ports:
|
||||
- 0.0.0.0:8646:8646/tcp
|
||||
<<:
|
||||
- *logging
|
||||
volumes:
|
||||
- ./run_nwaku_store_client_sqlite.sh:/opt/run_nwaku_store_client_sqlite.sh:Z
|
||||
entrypoint: sh
|
||||
command:
|
||||
- /opt/run_nwaku_store_client_sqlite.sh
|
||||
depends_on:
|
||||
- nwaku_sqlite
|
||||
|
||||
msg_publisher:
|
||||
## Sends json-rpc 'post_waku_v2_relay_v1_message' messages infinitely
|
||||
|
@ -79,21 +113,6 @@ services:
|
|||
- nwaku_postgres
|
||||
- nwaku_sqlite
|
||||
|
||||
store_query_producer:
|
||||
## Sends json-rpc 'get_waku_v2_store_v1_messages' messages infinitely
|
||||
image: alpine:3.16
|
||||
restart: on-failure
|
||||
logging:
|
||||
driver: "none"
|
||||
volumes:
|
||||
- ./store_query_producer.sh:/opt/store_query_producer.sh:Z
|
||||
entrypoint: sh
|
||||
command:
|
||||
- /opt/store_query_producer.sh
|
||||
depends_on:
|
||||
- nwaku_postgres
|
||||
- nwaku_sqlite
|
||||
|
||||
prometheus:
|
||||
image: docker.io/prom/prometheus:latest
|
||||
volumes:
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
|
||||
## Summary
|
||||
|
||||
The [jmeter](https://jmeter.apache.org/) is used to force concurrent Store
|
||||
requests.
|
||||
|
||||
_jmeter_ launches concurrent users that perform http requests to two _Store_
|
||||
node clients. And the _Test Plan_ is defined in _http_store_requests.jmx_.
|
||||
|
||||
_jmeter_ is thought to be used in combination of the `docker compose up`.
|
||||
|
||||
## jmeter
|
||||
|
||||
### Prerequisite
|
||||
- `docker compose up` to be running.
|
||||
- Java should be installed (e.g. "1.8.0_382")
|
||||
|
||||
### How to use jmeter
|
||||
- From CLI and Linux, go to `apache-jmeter-5.6.2/bin` and run `bash jmeter.sh`.
|
||||
- Load the _http_store_requests.jmx_ test plan file.
|
||||
- Hit the "play" button and check the "Summary Report", for example.
|
||||
|
|
@ -0,0 +1,359 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.6.2">
|
||||
<hashTree>
|
||||
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
|
||||
<boolProp name="TestPlan.functional_mode">false</boolProp>
|
||||
<boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp>
|
||||
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
|
||||
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
||||
<collectionProp name="Arguments.arguments"/>
|
||||
</elementProp>
|
||||
</TestPlan>
|
||||
<hashTree>
|
||||
<Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
||||
<collectionProp name="Arguments.arguments">
|
||||
<elementProp name="path" elementType="Argument">
|
||||
<stringProp name="Argument.name">path</stringProp>
|
||||
<stringProp name="Argument.value">/store/v1/messages</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="contentType" elementType="Argument">
|
||||
<stringProp name="Argument.name">contentType</stringProp>
|
||||
<stringProp name="Argument.value">application/json</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="method" elementType="Argument">
|
||||
<stringProp name="Argument.name">method</stringProp>
|
||||
<stringProp name="Argument.value">GET</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="body" elementType="Argument">
|
||||
<stringProp name="Argument.name">body</stringProp>
|
||||
<stringProp name="Argument.value"></stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="pubsubtopic" elementType="Argument">
|
||||
<stringProp name="Argument.name">pubsubtopic</stringProp>
|
||||
<stringProp name="Argument.value">/waku/2/default-waku/proto</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="num_users" elementType="Argument">
|
||||
<stringProp name="Argument.name">num_users</stringProp>
|
||||
<stringProp name="Argument.value">10</stringProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
</elementProp>
|
||||
</collectionProp>
|
||||
</Arguments>
|
||||
<hashTree/>
|
||||
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
|
||||
<boolProp name="ResultCollector.error_logging">false</boolProp>
|
||||
<objProp>
|
||||
<name>saveConfig</name>
|
||||
<value class="SampleSaveConfiguration">
|
||||
<time>true</time>
|
||||
<latency>true</latency>
|
||||
<timestamp>true</timestamp>
|
||||
<success>true</success>
|
||||
<label>true</label>
|
||||
<code>true</code>
|
||||
<message>true</message>
|
||||
<threadName>true</threadName>
|
||||
<dataType>true</dataType>
|
||||
<encoding>false</encoding>
|
||||
<assertions>true</assertions>
|
||||
<subresults>true</subresults>
|
||||
<responseData>false</responseData>
|
||||
<samplerData>false</samplerData>
|
||||
<xml>false</xml>
|
||||
<fieldNames>true</fieldNames>
|
||||
<responseHeaders>false</responseHeaders>
|
||||
<requestHeaders>false</requestHeaders>
|
||||
<responseDataOnError>false</responseDataOnError>
|
||||
<saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
|
||||
<assertionsResultsToSave>0</assertionsResultsToSave>
|
||||
<bytes>true</bytes>
|
||||
<sentBytes>true</sentBytes>
|
||||
<url>true</url>
|
||||
<threadCounts>true</threadCounts>
|
||||
<idleTime>true</idleTime>
|
||||
<connectTime>true</connectTime>
|
||||
</value>
|
||||
</objProp>
|
||||
<stringProp name="filename"></stringProp>
|
||||
</ResultCollector>
|
||||
<hashTree/>
|
||||
<ResultCollector guiclass="TableVisualizer" testclass="ResultCollector" testname="View Results in Table" enabled="true">
|
||||
<boolProp name="ResultCollector.error_logging">false</boolProp>
|
||||
<objProp>
|
||||
<name>saveConfig</name>
|
||||
<value class="SampleSaveConfiguration">
|
||||
<time>true</time>
|
||||
<latency>true</latency>
|
||||
<timestamp>true</timestamp>
|
||||
<success>true</success>
|
||||
<label>true</label>
|
||||
<code>true</code>
|
||||
<message>true</message>
|
||||
<threadName>true</threadName>
|
||||
<dataType>true</dataType>
|
||||
<encoding>false</encoding>
|
||||
<assertions>true</assertions>
|
||||
<subresults>true</subresults>
|
||||
<responseData>false</responseData>
|
||||
<samplerData>false</samplerData>
|
||||
<xml>false</xml>
|
||||
<fieldNames>true</fieldNames>
|
||||
<responseHeaders>false</responseHeaders>
|
||||
<requestHeaders>false</requestHeaders>
|
||||
<responseDataOnError>false</responseDataOnError>
|
||||
<saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
|
||||
<assertionsResultsToSave>0</assertionsResultsToSave>
|
||||
<bytes>true</bytes>
|
||||
<sentBytes>true</sentBytes>
|
||||
<url>true</url>
|
||||
<threadCounts>true</threadCounts>
|
||||
<idleTime>true</idleTime>
|
||||
<connectTime>true</connectTime>
|
||||
</value>
|
||||
</objProp>
|
||||
<stringProp name="filename"></stringProp>
|
||||
</ResultCollector>
|
||||
<hashTree/>
|
||||
<ResultCollector guiclass="StatVisualizer" testclass="ResultCollector" testname="Aggregate Report" enabled="true">
|
||||
<boolProp name="ResultCollector.error_logging">false</boolProp>
|
||||
<objProp>
|
||||
<name>saveConfig</name>
|
||||
<value class="SampleSaveConfiguration">
|
||||
<time>true</time>
|
||||
<latency>true</latency>
|
||||
<timestamp>true</timestamp>
|
||||
<success>true</success>
|
||||
<label>true</label>
|
||||
<code>true</code>
|
||||
<message>true</message>
|
||||
<threadName>true</threadName>
|
||||
<dataType>true</dataType>
|
||||
<encoding>false</encoding>
|
||||
<assertions>true</assertions>
|
||||
<subresults>true</subresults>
|
||||
<responseData>false</responseData>
|
||||
<samplerData>false</samplerData>
|
||||
<xml>false</xml>
|
||||
<fieldNames>true</fieldNames>
|
||||
<responseHeaders>false</responseHeaders>
|
||||
<requestHeaders>false</requestHeaders>
|
||||
<responseDataOnError>false</responseDataOnError>
|
||||
<saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
|
||||
<assertionsResultsToSave>0</assertionsResultsToSave>
|
||||
<bytes>true</bytes>
|
||||
<sentBytes>true</sentBytes>
|
||||
<url>true</url>
|
||||
<threadCounts>true</threadCounts>
|
||||
<idleTime>true</idleTime>
|
||||
<connectTime>true</connectTime>
|
||||
</value>
|
||||
</objProp>
|
||||
<stringProp name="filename"></stringProp>
|
||||
</ResultCollector>
|
||||
<hashTree/>
|
||||
<ResultCollector guiclass="SummaryReport" testclass="ResultCollector" testname="Summary Report" enabled="true">
|
||||
<boolProp name="ResultCollector.error_logging">false</boolProp>
|
||||
<objProp>
|
||||
<name>saveConfig</name>
|
||||
<value class="SampleSaveConfiguration">
|
||||
<time>true</time>
|
||||
<latency>true</latency>
|
||||
<timestamp>true</timestamp>
|
||||
<success>true</success>
|
||||
<label>true</label>
|
||||
<code>true</code>
|
||||
<message>true</message>
|
||||
<threadName>true</threadName>
|
||||
<dataType>true</dataType>
|
||||
<encoding>false</encoding>
|
||||
<assertions>true</assertions>
|
||||
<subresults>true</subresults>
|
||||
<responseData>false</responseData>
|
||||
<samplerData>false</samplerData>
|
||||
<xml>false</xml>
|
||||
<fieldNames>true</fieldNames>
|
||||
<responseHeaders>false</responseHeaders>
|
||||
<requestHeaders>false</requestHeaders>
|
||||
<responseDataOnError>false</responseDataOnError>
|
||||
<saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
|
||||
<assertionsResultsToSave>0</assertionsResultsToSave>
|
||||
<bytes>true</bytes>
|
||||
<sentBytes>true</sentBytes>
|
||||
<url>true</url>
|
||||
<threadCounts>true</threadCounts>
|
||||
<idleTime>true</idleTime>
|
||||
<connectTime>true</connectTime>
|
||||
</value>
|
||||
</objProp>
|
||||
<stringProp name="filename"></stringProp>
|
||||
</ResultCollector>
|
||||
<hashTree/>
|
||||
<ResultCollector guiclass="RespTimeGraphVisualizer" testclass="ResultCollector" testname="Response Time Graph" enabled="true">
|
||||
<boolProp name="ResultCollector.error_logging">false</boolProp>
|
||||
<objProp>
|
||||
<name>saveConfig</name>
|
||||
<value class="SampleSaveConfiguration">
|
||||
<time>true</time>
|
||||
<latency>true</latency>
|
||||
<timestamp>true</timestamp>
|
||||
<success>true</success>
|
||||
<label>true</label>
|
||||
<code>true</code>
|
||||
<message>true</message>
|
||||
<threadName>true</threadName>
|
||||
<dataType>true</dataType>
|
||||
<encoding>false</encoding>
|
||||
<assertions>true</assertions>
|
||||
<subresults>true</subresults>
|
||||
<responseData>false</responseData>
|
||||
<samplerData>false</samplerData>
|
||||
<xml>false</xml>
|
||||
<fieldNames>true</fieldNames>
|
||||
<responseHeaders>false</responseHeaders>
|
||||
<requestHeaders>false</requestHeaders>
|
||||
<responseDataOnError>false</responseDataOnError>
|
||||
<saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
|
||||
<assertionsResultsToSave>0</assertionsResultsToSave>
|
||||
<bytes>true</bytes>
|
||||
<sentBytes>true</sentBytes>
|
||||
<url>true</url>
|
||||
<threadCounts>true</threadCounts>
|
||||
<idleTime>true</idleTime>
|
||||
<connectTime>true</connectTime>
|
||||
</value>
|
||||
</objProp>
|
||||
<stringProp name="filename"></stringProp>
|
||||
</ResultCollector>
|
||||
<hashTree/>
|
||||
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group (Postgres)" enabled="true">
|
||||
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
|
||||
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
|
||||
<intProp name="LoopController.loops">-1</intProp>
|
||||
<boolProp name="LoopController.continue_forever">false</boolProp>
|
||||
</elementProp>
|
||||
<stringProp name="ThreadGroup.num_threads">${num_users}</stringProp>
|
||||
<stringProp name="ThreadGroup.ramp_time">1</stringProp>
|
||||
<boolProp name="ThreadGroup.scheduler">false</boolProp>
|
||||
<stringProp name="ThreadGroup.duration"></stringProp>
|
||||
<stringProp name="ThreadGroup.delay"></stringProp>
|
||||
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
|
||||
<boolProp name="ThreadGroup.delayedStart">false</boolProp>
|
||||
<stringProp name="TestPlan.comments">Sends GET requests to the node which has a postgres-store-node</stringProp>
|
||||
</ThreadGroup>
|
||||
<hashTree>
|
||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request (Postgres)" enabled="true">
|
||||
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
|
||||
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
||||
<collectionProp name="Arguments.arguments">
|
||||
<elementProp name="pubsubtopic" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">pubsubtopic</stringProp>
|
||||
<stringProp name="Argument.value">${pubsubtopic}</stringProp>
|
||||
</elementProp>
|
||||
</collectionProp>
|
||||
</elementProp>
|
||||
<stringProp name="HTTPSampler.domain">127.0.0.1</stringProp>
|
||||
<stringProp name="HTTPSampler.port">8645</stringProp>
|
||||
<stringProp name="HTTPSampler.contentEncoding">${contentType}</stringProp>
|
||||
<stringProp name="HTTPSampler.path">${path}</stringProp>
|
||||
<stringProp name="HTTPSampler.method">${method}</stringProp>
|
||||
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
||||
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
||||
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
||||
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
||||
<boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">false</boolProp>
|
||||
<boolProp name="HTTPSampler.image_parser">false</boolProp>
|
||||
<boolProp name="HTTPSampler.concurrentDwn">false</boolProp>
|
||||
<stringProp name="HTTPSampler.concurrentPool">6</stringProp>
|
||||
<boolProp name="HTTPSampler.md5">false</boolProp>
|
||||
<intProp name="HTTPSampler.ipSourceType">0</intProp>
|
||||
<stringProp name="TestPlan.comments">Sends Store GET http requests to the nwaku Store node client. In turn, that store-node client is connected to an Store nwaku node with Postgres</stringProp>
|
||||
</HTTPSamplerProxy>
|
||||
<hashTree>
|
||||
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
||||
<collectionProp name="HeaderManager.headers">
|
||||
<elementProp name="" elementType="Header">
|
||||
<stringProp name="Header.name">User-Agent</stringProp>
|
||||
<stringProp name="Header.value">ApacheJMeter</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="" elementType="Header">
|
||||
<stringProp name="Header.name">Content-Type</stringProp>
|
||||
<stringProp name="Header.value">${contentType}</stringProp>
|
||||
</elementProp>
|
||||
</collectionProp>
|
||||
</HeaderManager>
|
||||
<hashTree/>
|
||||
</hashTree>
|
||||
</hashTree>
|
||||
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group (SQLIte)" enabled="true">
|
||||
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
|
||||
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
|
||||
<intProp name="LoopController.loops">-1</intProp>
|
||||
<boolProp name="LoopController.continue_forever">false</boolProp>
|
||||
</elementProp>
|
||||
<stringProp name="ThreadGroup.num_threads">${num_users}</stringProp>
|
||||
<stringProp name="ThreadGroup.ramp_time">1</stringProp>
|
||||
<boolProp name="ThreadGroup.scheduler">false</boolProp>
|
||||
<stringProp name="ThreadGroup.duration"></stringProp>
|
||||
<stringProp name="ThreadGroup.delay"></stringProp>
|
||||
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
|
||||
<boolProp name="ThreadGroup.delayedStart">false</boolProp>
|
||||
<stringProp name="TestPlan.comments">Sends GET requests to the node which has a sqlite-store-node</stringProp>
|
||||
</ThreadGroup>
|
||||
<hashTree>
|
||||
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request (SQLite)" enabled="true">
|
||||
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
|
||||
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
||||
<collectionProp name="Arguments.arguments">
|
||||
<elementProp name="pubsubtopic" elementType="HTTPArgument">
|
||||
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
||||
<stringProp name="Argument.metadata">=</stringProp>
|
||||
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
||||
<stringProp name="Argument.name">pubsubtopic</stringProp>
|
||||
<stringProp name="Argument.value">${pubsubtopic}</stringProp>
|
||||
</elementProp>
|
||||
</collectionProp>
|
||||
</elementProp>
|
||||
<stringProp name="HTTPSampler.domain">127.0.0.1</stringProp>
|
||||
<stringProp name="HTTPSampler.port">8646</stringProp>
|
||||
<stringProp name="HTTPSampler.contentEncoding">${contentType}</stringProp>
|
||||
<stringProp name="HTTPSampler.path">${path}</stringProp>
|
||||
<stringProp name="HTTPSampler.method">${method}</stringProp>
|
||||
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
||||
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
||||
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
||||
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
||||
<boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">false</boolProp>
|
||||
<boolProp name="HTTPSampler.image_parser">false</boolProp>
|
||||
<boolProp name="HTTPSampler.concurrentDwn">false</boolProp>
|
||||
<stringProp name="HTTPSampler.concurrentPool">6</stringProp>
|
||||
<boolProp name="HTTPSampler.md5">false</boolProp>
|
||||
<intProp name="HTTPSampler.ipSourceType">0</intProp>
|
||||
<stringProp name="TestPlan.comments">Sends Store GET http requests to the nwaku Store node client. In turn, that store-node client is connected to an Store nwaku node with SQLite</stringProp>
|
||||
</HTTPSamplerProxy>
|
||||
<hashTree>
|
||||
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
||||
<collectionProp name="HeaderManager.headers">
|
||||
<elementProp name="" elementType="Header">
|
||||
<stringProp name="Header.name">User-Agent</stringProp>
|
||||
<stringProp name="Header.value">ApacheJMeter</stringProp>
|
||||
</elementProp>
|
||||
<elementProp name="" elementType="Header">
|
||||
<stringProp name="Header.name">Content-Type</stringProp>
|
||||
<stringProp name="Header.value">${contentType}</stringProp>
|
||||
</elementProp>
|
||||
</collectionProp>
|
||||
</HeaderManager>
|
||||
<hashTree/>
|
||||
</hashTree>
|
||||
</hashTree>
|
||||
</hashTree>
|
||||
</hashTree>
|
||||
</jmeterTestPlan>
|
|
@ -2703,20 +2703,6 @@
|
|||
"legendFormat": "{{type}}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "PBFA97CFB590B2093"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": true,
|
||||
"expr": "sum by (type)(increase(waku_store_errors{instance=~\"nwaku_postgres:8003\"}[1m]))",
|
||||
"hide": false,
|
||||
"interval": "",
|
||||
"legendFormat": "{{type}}",
|
||||
"range": true,
|
||||
"refId": "B"
|
||||
}
|
||||
],
|
||||
"title": "Waku Archive Errors (Postgres) (1m rate)",
|
||||
|
@ -2805,26 +2791,12 @@
|
|||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": true,
|
||||
"expr": "sum by (type)(increase(waku_archive_errors{instance=~\"nwaku_:8004\"}[1m]))",
|
||||
"expr": "sum by (type)(increase(waku_archive_errors{instance=~\"nwaku_sqlite:8004\"}[1m]))",
|
||||
"hide": false,
|
||||
"interval": "",
|
||||
"legendFormat": "{{type}}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "PBFA97CFB590B2093"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": true,
|
||||
"expr": "sum by (type)(increase(waku_store_errors{instance=~\"nwaku_sqlite:8004\"}[1m]))",
|
||||
"hide": false,
|
||||
"interval": "",
|
||||
"legendFormat": "{{type}}",
|
||||
"range": true,
|
||||
"refId": "B"
|
||||
}
|
||||
],
|
||||
"title": "Waku Archive Errors (SQLite) (1m rate)",
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
## Install the `dig` command
|
||||
apk add --update bind-tools
|
||||
|
||||
peer_IP=$(dig +short nwaku_postgres)
|
||||
|
||||
exec /usr/bin/wakunode\
|
||||
--nodekey=7d714a1fada214dead6dc9c7274585eca0ff292451866e7d6d677dc818e8ccd2\
|
||||
--storenode=/ip4/${peer_IP}/tcp/30303/p2p/16Uiu2HAmJyLCRhiErTRFcW5GKPrpoMjGbbWdFMx4GCUnnhmxeYhd\
|
||||
--log-level=ERROR\
|
||||
--rest=true\
|
||||
--rest-port=8645\
|
||||
--rest-address=0.0.0.0
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
## Install the `dig` command
|
||||
apk add --update bind-tools
|
||||
|
||||
peer_IP=$(dig +short nwaku_sqlite)
|
||||
|
||||
exec /usr/bin/wakunode\
|
||||
--nodekey=5d714a1fada214dead6dc9c7274585eca0ff292451866e7d6d677dc818e8ccd2\
|
||||
--storenode=/ip4/${peer_IP}/tcp/30304/p2p/16Uiu2HAkxj3WzLiqBximSaHc8wV9Co87GyRGRYLVGsHZrzi3TL5W\
|
||||
--log-level=ERROR\
|
||||
--rest=true\
|
||||
--rest-port=8646\
|
||||
--rest-address=0.0.0.0
|
|
@ -8,17 +8,12 @@ peer_IP=$(dig +short nwaku_sqlite)
|
|||
exec /usr/bin/wakunode\
|
||||
--nodekey=1d714a1fada214dead6dc9c7274585eca0ff292451866e7d6d677dc818e8ccd2\
|
||||
--staticnode=/ip4/${peer_IP}/tcp/30304/p2p/16Uiu2HAkxj3WzLiqBximSaHc8wV9Co87GyRGRYLVGsHZrzi3TL5W\
|
||||
--storenode=/ip4/${peer_IP}/tcp/30304/p2p/16Uiu2HAkxj3WzLiqBximSaHc8wV9Co87GyRGRYLVGsHZrzi3TL5W\
|
||||
--relay=true\
|
||||
--topic=/waku/2/default-waku/proto\
|
||||
--topic=/waku/2/dev-waku/proto\
|
||||
--filter=true\
|
||||
--lightpush=true\
|
||||
--rpc-admin=true\
|
||||
--keep-alive=true\
|
||||
--max-connections=150\
|
||||
--log-level=DEBUG\
|
||||
--dns-discovery=true\
|
||||
--log-level=ERROR\
|
||||
--rpc-port=8545\
|
||||
--rpc-address=0.0.0.0\
|
||||
--tcp-port=30303\
|
|
@ -8,17 +8,12 @@ peer_IP=$(dig +short nwaku_postgres)
|
|||
exec /usr/bin/wakunode\
|
||||
--nodekey=2d714a1fada214dead6dc9c7274585eca0ff292451866e7d6d677dc818e8ccd2\
|
||||
--staticnode=/ip4/${peer_IP}/tcp/30303/p2p/16Uiu2HAmJyLCRhiErTRFcW5GKPrpoMjGbbWdFMx4GCUnnhmxeYhd\
|
||||
--storenode=/ip4/${peer_IP}/tcp/30303/p2p/16Uiu2HAmJyLCRhiErTRFcW5GKPrpoMjGbbWdFMx4GCUnnhmxeYhd\
|
||||
--relay=true\
|
||||
--topic=/waku/2/default-waku/proto\
|
||||
--topic=/waku/2/dev-waku/proto\
|
||||
--filter=true\
|
||||
--lightpush=true\
|
||||
--rpc-admin=true\
|
||||
--keep-alive=true\
|
||||
--max-connections=150\
|
||||
--log-level=DEBUG\
|
||||
--dns-discovery=true\
|
||||
--log-level=ERROR\
|
||||
--rpc-port=8546\
|
||||
--rpc-address=0.0.0.0\
|
||||
--tcp-port=30304\
|
|
@ -1,31 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
## Install the `dig` command
|
||||
apk --no-cache add bind-tools
|
||||
|
||||
apk --no-cache add curl
|
||||
|
||||
## Install coreutils so that the `date` command behaves as the GNU one
|
||||
apk --no-cache add coreutils
|
||||
|
||||
## The port numbers and host names are defined in the 'docker-compose.yml' file
|
||||
nwaku_postgres_IP=$(dig +short nwaku_postgres)
|
||||
nwaku_sqlite_IP=$(dig +short nwaku_sqlite)
|
||||
target_postgres="http://${nwaku_postgres_IP}:8545"
|
||||
target_sqlite="http://${nwaku_sqlite_IP}:8546"
|
||||
|
||||
echo "This is publisher: ${target_postgres}; ${target_sqlite}"
|
||||
|
||||
## Wait a few seconds until the `nwaku` nodes started their rpc services
|
||||
sleep 20
|
||||
|
||||
while true
|
||||
do
|
||||
## Send a 'get_waku_v2_store_v1_messages' req to the ""postgres"" node
|
||||
curl -d '{"jsonrpc":"2.0","id":"id","method":"get_waku_v2_store_v1_messages"}' --header "Content-Type: application/json" ${target_postgres}
|
||||
|
||||
## Send a 'get_waku_v2_store_v1_messages' req to the ""sqlite"" node
|
||||
curl -d '{"jsonrpc":"2.0","id":"id","method":"get_waku_v2_store_v1_messages"}' --header "Content-Type: application/json" ${target_sqlite}
|
||||
|
||||
sleep 5
|
||||
done
|
Loading…
Reference in New Issue