-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
e7d5c27e72236cb7d4ba6cff580b8fc65623d178
- Loading branch information
Showing
22 changed files
with
480 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
--- | ||
title: Aggregator | ||
description: | ||
categories: [Aggregator] | ||
weight: 10 | ||
--- | ||
|
||
The aggregator collects samples and stores them somewhere. | ||
|
||
### 1. phout | ||
|
||
**All config** | ||
|
||
```yaml | ||
result: | ||
type: phout | ||
destination: file_path.log | ||
id: false # Print ammo ids if true. | ||
flush-time: 1s | ||
sample-queue-size: 262144 | ||
buffer-size: 1048576 | ||
``` | ||
### 2. jsonlines | ||
```yaml | ||
result: | ||
type: jsonlines | ||
sink: | ||
type: file | ||
path: file_path | ||
buffer-size: 1048576 | ||
flush-interval: 1s | ||
sample-queue-size: 131072 | ||
marshal-float-with-6-digits: false | ||
sort-map-keys: false | ||
``` | ||
See [here](./sink.md) for other types for `sink`. | ||
|
||
### 3. json | ||
|
||
This is an alias for `jsonlines`. | ||
|
||
### 4. log | ||
|
||
Output aggregator data to Pandora's standard logs | ||
|
||
```yaml | ||
result: | ||
type: log | ||
``` | ||
|
||
### 5. discard | ||
|
||
Discard aggregator output | ||
|
||
```yaml | ||
result: | ||
type: discard | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
title: Sink | ||
description: | ||
categories: [Aggregators] | ||
weight: 2 | ||
--- | ||
|
||
1. file | ||
|
||
```yaml | ||
sink: | ||
type: file | ||
path: file_path | ||
``` | ||
2. stdout | ||
```yaml | ||
sink: | ||
type: stdout | ||
``` | ||
3. stderr | ||
```yaml | ||
sink: | ||
type: stderr | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
title: Best practices | ||
description: | ||
categories: [Best practices] | ||
weight: 6 | ||
weight: 12 | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
title: Dummy generator | ||
description: Dummy generator is used to check load profiles | ||
categories: [Provider] | ||
tags: [provider, dummy] | ||
weight: 1 | ||
--- | ||
|
||
When you are creating a complex load profile that consists of multiple phases, or just want to test | ||
what your load profile will look like, you can use the Dummy Generator to keep your test server unloaded in the first stage. | ||
|
||
```yaml | ||
gun: | ||
type: dummy | ||
sleep: 10ms # optional | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: Providers | ||
description: Pandora component responsible for generating Payload from files for the generator | ||
categories: [Providers] | ||
weight: 3 | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
title: Data Sources | ||
description: To simplify the implementation of your custom generators | ||
categories: [Provider] | ||
tags: [provider, dummy] | ||
weight: 40 | ||
--- | ||
|
||
Used for json providers | ||
|
||
There are 3 data sources | ||
|
||
1. `file` | ||
|
||
```yaml | ||
source: | ||
type: file | ||
path: you_path | ||
``` | ||
2. `stdin` | ||
|
||
```yaml | ||
source: | ||
type: stdin | ||
``` | ||
|
||
3. `inline` | ||
|
||
```yaml | ||
source: | ||
type: inline | ||
data: | | ||
{"you": "json"} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
title: Dummy Provider | ||
description: Dummy provider is used for generators without external Payload. | ||
categories: [Provider] | ||
tags: [provider, dummy] | ||
weight: 30 | ||
--- | ||
|
||
Pandora requires a Provider configuration. But there are cases where you don't need any Payload. | ||
In such cases, you can use an empty `dummy` Provider | ||
|
||
```yaml | ||
ammo: | ||
type: dummy | ||
``` | ||
This provider is useful in 2 cases: | ||
1. for checks on your payload profile configuration | ||
2. for custom generators, where you prepare your Payloads inside the generator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
title: JSON provider | ||
description: JSON provider converts to Payload json files | ||
categories: [Provider] | ||
tags: [provider, json] | ||
weight: 20 | ||
--- | ||
|
||
The provider reads the payload files and passes a structure of the desired type to the generators. | ||
|
||
Since you cannot use your own structures in the default build, the default provider returns | ||
`map[string]interface{}{}` | ||
|
||
But this provider is convenient for creating custom generators. | ||
You only need to specify your type into which you want to marshal the json file | ||
|
||
```go | ||
import ( | ||
"github.com/yandex/pandora/core" | ||
coreimport "github.com/yandex/pandora/core/import" | ||
) | ||
|
||
type MyCustomPayload struct { | ||
URL string | ||
QueryParam string | ||
} | ||
|
||
//... | ||
coreimport.RegisterCustomJSONProvider("my-custom-provider-name", func() core.Ammo { return &MyCustomPayload{} }) | ||
//... | ||
``` | ||
|
||
And specify your ISP in the config | ||
|
||
```yaml | ||
provider: | ||
type: my-custom-provider-name | ||
ammo-queue-size: 1 | ||
limit: 0 | ||
passes: 0 | ||
source: | ||
type: file | ||
path: my-costom-payload.json | ||
``` | ||
You can also use `stdin`, `inline` for the source. See [payload sources](data-sources.md) for more details |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
--- | ||
title: Аггрегатор | ||
description: | ||
categories: [Aggregator] | ||
weight: 10 | ||
--- | ||
|
||
Агрегатор собирает замеры запросов и сохраняет их в каком-нибудь месте. | ||
|
||
|
||
### 1. phout | ||
|
||
**Минимальный конфиг** | ||
|
||
```yaml | ||
result: | ||
type: phout | ||
destination: file_path.log | ||
``` | ||
**Весь конфиг** | ||
```yaml | ||
result: | ||
type: phout | ||
destination: file_path.log | ||
id: false # Print ammo ids if true. | ||
flush-time: 1s | ||
sample-queue-size: 262144 | ||
buffer-size: 1048576 | ||
``` | ||
### 2. jsonlines | ||
**Минимальный конфиг** | ||
```yaml | ||
result: | ||
type: jsonlines | ||
sink: | ||
type: file | ||
path: file_path | ||
``` | ||
**Весь конфиг** | ||
```yaml | ||
result: | ||
type: jsonlines | ||
sink: | ||
type: file | ||
path: file_path | ||
buffer-size: 1048576 | ||
flush-interval: 1s | ||
sample-queue-size: 131072 | ||
marshal-float-with-6-digits: false | ||
sort-map-keys: false | ||
``` | ||
Какие еще типы для `sink` существуют смотрите [тут](./sink.md) | ||
|
||
### 3. json | ||
|
||
Эта псевдоним для `jsonlines` | ||
|
||
### 4. log | ||
|
||
Вывод данных аггрегатора в о стандартный лог Пандоры | ||
|
||
```yaml | ||
result: | ||
type: log | ||
``` | ||
|
||
### 5. discard | ||
|
||
Отказ от вывода аггрегатора | ||
|
||
```yaml | ||
result: | ||
type: discard | ||
``` |
Oops, something went wrong.