<commit_before># BOSH Diego Performance Release

This is a release to measure the performance of Diego. See the proposal [here](https://github.com/pivotal-cf-experimental/diego-dev-notes/blob/master/proposals/measuring_performance.md).

## Usage

### Prerequisites

Deploy diego-release, cf-release.  To deploy this release, create a BOSH
deployment manifest with as many pusher instances as you want to use for
testing.

### To Run Fezzik

1. `bosh ssh stress_tests 0`
1. Run `/var/vcap/jobs/caddy/bin/1_fezzik` multiple times.
1. Output is stored in `/var/vcap/packages/fezzik/src/github.com/cloudfoundry-incubator/fezzik/reports.json`

### To Run Cedar (single pusher stress test)

1. Make sure you're targeting a default diego enabled backend CF deployment
1. Target a chosen org and space
1. cd src/cedar/assets/stress-app
1. Precompile the stress-app to `assets/temp-app` by running `GOOS=linux GOARCH=amd64 go build -o ../temp-app/stress-app`
1. cd back to src/cedar
1. Build the cedar binary with `go build`
1. Run the following to start a test
```bash
./cedar -n 2 -k 2 [-config <path-to-config.json-file>] [-payload <path-to-dir-containing-app-payload>] [-domain <your-app-domain>] [-tolerance <tolerance-factor>]
```
Where:
- `n` is the number of desired batches of apps described by the config file that will be seeded
- `k` is the max number of cf operations in flight.
- `config` if not specified will default to `./config.json` which reflects the mix of apps specified in the [performance protocol](https://github.com/cloudfoundry/diego-dev-notes/blob/master/proposals/measuring_performance.md#experiment-2-launching-and-running-many-cf-applications).
- `payload` if not specified will default to `assets/temp-app` which should only contain the precompiled binary generated above.
- `domain` if not specified will default to `bosh-lite.com`.
- `tolerance` is the ratio of apps the are allowed to fail, before Cedar terminates. If not specified, it defaults to `1.0`, i.e. deploys all apps and does not fail due to app failures.

Example `config.json` file:
```json
[<commit_msg>Update cedar path in README<commit_after># BOSH Diego Performance Release

This is a release to measure the performance of Diego. See the proposal [here](https://github.com/pivotal-cf-experimental/diego-dev-notes/blob/master/proposals/measuring_performance.md).

## Usage

### Prerequisites

Deploy diego-release, cf-release.  To deploy this release, create a BOSH
deployment manifest with as many pusher instances as you want to use for
testing.

### To Run Fezzik

1. `bosh ssh stress_tests 0`
1. Run `/var/vcap/jobs/caddy/bin/1_fezzik` multiple times.
1. Output is stored in `/var/vcap/packages/fezzik/src/github.com/cloudfoundry-incubator/fezzik/reports.json`

### To Run Cedar (single pusher stress test)

1. Make sure you're targeting a default diego enabled backend CF deployment
1. Target a chosen org and space
1. cd src/code.cloudfoundry.org/diego-stress-tests/cedar/assets/stress-app
1. Precompile the stress-app to `assets/temp-app` by running `GOOS=linux GOARCH=amd64 go build -o ../temp-app/stress-app`
1. cd back to src/cedar
1. Build the cedar binary with `go build`
1. Run the following to start a test
```bash
./cedar -n 2 -k 2 [-config <path-to-config.json-file>] [-payload <path-to-dir-containing-app-payload>] [-domain <your-app-domain>] [-tolerance <tolerance-factor>]
```
Where:
- `n` is the number of desired batches of apps described by the config file that will be seeded
- `k` is the max number of cf operations in flight.
- `config` if not specified will default to `./config.json` which reflects the mix of apps specified in the [performance protocol](https://github.com/cloudfoundry/diego-dev-notes/blob/master/proposals/measuring_performance.md#experiment-2-launching-and-running-many-cf-applications).
- `payload` if not specified will default to `assets/temp-app` which should only contain the precompiled binary generated above.
- `domain` if not specified will default to `bosh-lite.com`.
- `tolerance` is the ratio of apps the are allowed to fail, before Cedar terminates. If not specified, it defaults to `1.0`, i.e. deploys all apps and does not fail due to app failures.

Example `config.json` file:
```json
[
{'fraction_non_alphanumeric': 0.10705022400377269, 'fraction_numerical': 0.008960150907804764, 'mean_word_length': 4.243510506798517, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '154108', 'n_tokens_mistral': 1383, 'n_tokens_neox': 1299, 'n_words': 508}