Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
antempus committed May 28, 2020
1 parent a09a3a7 commit 05edfeb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
# GraphQL Perfomance Test

Meta repo for creating resources in Azure Cloud via Terraform, creating docker images to run in Azure, and the scripts to run against the deployed resources
Meta repo for creating docker images, for creating resources in Azure via Terraform for those images, and scripts to run against them for load test

#### Setup

Each folder contains a README that will help instrument the work to build out the required Docker images and Azure infrastructure:

[Function App](./functionapp/README.md)
[Web App](./functionapp/README.md)
[Infrastructure](./functionapp/README.md)
[Function App](./functionapp/README.md)
[Web App](./functionapp/README.md)
[Infrastructure](./functionapp/README.md)

#### CosmosDB Account
The account should have a database name `database` and a container within named `users` with a partition key of `/id`. This is a hard requirement and will prevent the perf test from running and data upload from processing.
#### CosmosDB Account

The account should have a database name `database` and a container within named `users` with a partition key of `/id`. This is a hard requirement and will prevent the perf test from running and data upload from processing.

##### User Data

The backing database will require data of a specific structure, to support this i've included `perf_tests/users.json` that will provide 1000 users to query against during the load test, with the data generated via `mockaroo.com`.

This data will only needed to be populated once when using a predefined container for cosmos, but if you are creating the database on the fly, it can ran via `npm run populate` for each db creation
Expand Down
5 changes: 3 additions & 2 deletions scripts/functionapp.perf.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ const autocannon = require('autocannon');

const {
env: {
functionapp_url: url, connections = 400, duration = 30, overallRate = 400,
functionapp_url: url, connections = 50, duration = 30, connectionRate = 40,

},
} = process;

Expand Down Expand Up @@ -34,7 +35,7 @@ autocannon.track(autocannon({
url,
connections,
duration,
overallRate,
connectionRate,
setupClient,
}, console.log), {
renderLatencyTable: true,
Expand Down
4 changes: 2 additions & 2 deletions scripts/webapp.perf.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const autocannon = require('autocannon');

const {
env: {
webapp_url: url, connections = 400, duration = 30, overallRate = 400,
webapp_url: url, connections = 50, duration = 30, connectionRate = 40,
},
} = process;

Expand Down Expand Up @@ -38,7 +38,7 @@ autocannon.track(autocannon({
url,
connections,
duration,
overallRate,
connectionRate,
setupClient,
}, console.log), {
renderLatencyTable: true,
Expand Down

0 comments on commit 05edfeb

Please sign in to comment.