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

2022 amends #1

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ The page that's used for the test is the default homepage that gets shipped with
1. Have a Webiny instance running
2. Clone this repo
3. Have JMeter installed
4. Amend the `benchmarks/pb-page-delivery.jmx` and set the `WEBINY_WEBSITE_URL` user variable to match your Public website: Website URL value.
5. Have [JMeter Plugins Manager](https://jmeter-plugins.org/install/Install/) installed, or manually install the required plugins
5. Amend the `benchmarks/pb-page-delivery.jmx` and set the `WEBINY_WEBSITE_URL` user variable to match your Public website: Website URL value.
**Note**: don't add the protocol, just the domain name, example: "xxxxxxx.cloudfront.net"
5. Run the test `HEAP="-Xms512m -Xmx4096m" ./_PATH_TO_JMETER_/bin/jmeter.sh -n -t ./pb-page-delivery.jmx -l ./results.log -e -o ./report`
6. Run the test `HEAP="-Xms512m -Xmx4096m" ./_PATH_TO_JMETER_/bin/jmeter.sh -n -t ./pb-page-delivery.jmx -l ./results.log -e -o ./report`

We recommend running the test from within the same AWS region using a more powerful instance, like `c5.2xlarge` as depending on your hardware you might not be able to generate the required load for the test.

Expand Down
16 changes: 10 additions & 6 deletions benchmarks/hc-write-data.jmx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.4.1">
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.5">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Webiny benchmark" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
Expand Down Expand Up @@ -74,7 +74,7 @@
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument" enabled="true">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{&quot;operationName&quot;:null,&quot;query&quot;:&quot;mutation {\n createOrder(data: \n {\n orderId: ${OrderID}\n orderDate: \&quot;${OrderDate}\&quot;\n shippingDate: \&quot;${ShipDate}\&quot;\n unitsSold: ${UnitsSold}\n unitPrice: ${UnitPrice}\n totalPrice: ${TotalRevenue}\n country: {\n modelId: \&quot;country\&quot;\n entryId: \&quot;${Country}\&quot;\n },\n itemType: {\n modelId: \&quot;itemType\&quot;\n entryId: \&quot;${ItemType}\&quot;\n },\n salesChannel: {\n modelId: \&quot;salesChannel\&quot;\n entryId: \&quot;${SalesChannel}\&quot;\n },\n orderPriority: {\n modelId: \&quot;orderPriority\&quot;\n entryId: \&quot;${OrderPriority}\&quot;\n },\n }) {\n data {\n id\n }\n error {\n message\n }\n }\n}&quot;}</stringProp>
<stringProp name="Argument.value">{&quot;operationName&quot;:null,&quot;query&quot;:&quot;mutation {\n createOrder(data: \n {\n orderId: ${OrderID}\n orderDate: \&quot;${OrderDate}\&quot;\n shippingDate: \&quot;${ShipDate}\&quot;\n unitsSold: ${UnitsSold}\n unitPrice: ${UnitPrice}\n totalPrice: ${TotalRevenue}\n country: {\n modelId: \&quot;country\&quot;\n id: \&quot;${Country}\&quot;\n },\n itemType: {\n modelId: \&quot;itemType\&quot;\n id: \&quot;${ItemType}\&quot;\n },\n salesChannel: {\n modelId: \&quot;salesChannel\&quot;\n id: \&quot;${SalesChannel}\&quot;\n },\n orderPriority: {\n modelId: \&quot;orderPriority\&quot;\n id: \&quot;${OrderPriority}\&quot;\n },\n }) {\n data {\n id\n }\n error {\n message\n }\n }\n}&quot;}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
<boolProp name="HTTPArgument.use_equals">true</boolProp>
</elementProp>
Expand Down Expand Up @@ -103,19 +103,19 @@
totalPrice: ${TotalRevenue}
country: {
modelId: &quot;country&quot;
entryId: &quot;${Country}&quot;
id: &quot;${Country}&quot;
},
itemType: {
modelId: &quot;itemType&quot;
entryId: &quot;${ItemType}&quot;
id: &quot;${ItemType}&quot;
},
salesChannel: {
modelId: &quot;salesChannel&quot;
entryId: &quot;${SalesChannel}&quot;
id: &quot;${SalesChannel}&quot;
},
orderPriority: {
modelId: &quot;orderPriority&quot;
entryId: &quot;${OrderPriority}&quot;
id: &quot;${OrderPriority}&quot;
},
}) {
data {
Expand All @@ -139,6 +139,10 @@
<stringProp name="Header.name">authorization</stringProp>
<stringProp name="Header.value">${AUTHORIZATION_TOKEN}</stringProp>
</elementProp>
<elementProp name="" elementType="Header">
<stringProp name="Header.name">Content-Type</stringProp>
<stringProp name="Header.value">application/json</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
Expand Down
4 changes: 2 additions & 2 deletions prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class PrepareBenchmark {
name: "${countryName}",
region: {
modelId: "region",
entryId: "${regionId}"
id: "${regionId}"
}
}) {
data {
Expand Down Expand Up @@ -220,7 +220,7 @@ class PrepareBenchmark {
const saleChannelNameEnum = saleChannelName.toLowerCase();
const mutation = gql`
mutation {
createSalesChannel(data: {type: "${saleChannelNameEnum}"}) {
createSalesChannel(data: {onOrOffline: "${saleChannelNameEnum}"}) {
Copy link
Author

Choose a reason for hiding this comment

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

❓ Not sure about this naming convention

data {
id
}
Expand Down