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

test(load): Change load test structure to more closely reflect custom… #53

Merged
merged 1 commit into from
Apr 25, 2018
Merged
Show file tree
Hide file tree
Changes from all 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
24 changes: 24 additions & 0 deletions load-test/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# overwrite any of these by defining them in the environment outside the Node.js process.
# DO NOT MODIFY THIS FILE FOR TEST PERMUTATIONS!

# App
APP_PORT=7681
APP_WORKERS=1

# Sensors
AGENT_PORT=42699
SENSOR_ENABLED=true
TRACING_ENABLED=true
STACK_TRACE_LENGTH=20

# Databases
MONGODB=127.0.0.1:27017
ELASTICSEARCH=127.0.0.1:9200
ZOOKEEPER=127.0.0.1:2181
KAFKA=127.0.0.1:9092
REDIS=127.0.0.1:6379
MYSQL_HOST=127.0.0.1
MYSQL_PORT=3306
MYSQL_USER=root
MYSQL_PW=nodepw
MYSQL_DB=nodedb
3 changes: 3 additions & 0 deletions load-test/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
rules:
no-console: 0
4 changes: 4 additions & 0 deletions load-test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
result
jmeter.log
temp
heapdump*
35 changes: 17 additions & 18 deletions load-test/README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
# Load Tests
This server provides a base to load test the Instana Node.js sensor.

## Configuration
Application specific configuration options can be found in `./src/config.js`. The most relevant one is `sensorEnabled` which controls whether or not the Node.js sensor is loaded.

## Execution
## Starting the App
The app can be started via `./runApps.bash`. It is configured via environment variables. The default values for the
environment variables can be seen in `.env`. The defaults can be easily overwritten like this `AGENT_PORT=3210 ./runApps.bash`.

### Starting required databases, messaging systems…
Start the required databases and middleware as described in the [contribution docs](https://github.com/instana/nodejs-sensor/blob/master/CONTRIBUTING.md).
### With Dummy Agent
The agent doesn't play a relevant role in the majority of load tests. For this reason, it is possible to execute the
load tests without the real agent. It can be done in the following way

### Starting the instrumented test application

```
cd load-test
npm run start
```
# start the agent stub
cd nodejs-sensor
DROP_DATA=true npm run agent-stub

### Starting the load test
[JMeter](https://jmeter.apache.org/) is being used to generate the load.

```
./jmeter/run.sh
# start the app (in a separate terminal)
cd nodejs-sensor/load
AGENT_PORT=3210 ./runApps.bash
```

## Results
The results of the load test can be found in `./jmeter/result/testresult`.
## Executing Load Tests

1. [Download JMeter](https://jmeter.apache.org/download_jmeter.cgi) and extract it. Put the `bin/` directory on your path.
2. Execute a load test: `TEST=httpCallSequence ./runLoadTest.bash`.
3. Check the results: `open result/testresult/index.html`.
301 changes: 0 additions & 301 deletions load-test/jmeter/JMeter.jmx

This file was deleted.

5 changes: 0 additions & 5 deletions load-test/jmeter/run.sh

This file was deleted.

7 changes: 0 additions & 7 deletions load-test/jmeter/user.properties

This file was deleted.

Loading