Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
f9583770112b3eaa1f00a8f151ffad6d7219b31f
  • Loading branch information
oke11o committed Mar 14, 2024
1 parent 63d78b6 commit 8b70505
Show file tree
Hide file tree
Showing 18 changed files with 283 additions and 43 deletions.
6 changes: 4 additions & 2 deletions .mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@
"docs/eng/scenario-grpc-generator.md":"load/projects/pandora/docs/eng/scenario-grpc-generator.md",
"docs/eng/scenario-http-generator.md":"load/projects/pandora/docs/eng/scenario-http-generator.md",
"docs/eng/scenario/variable_source.md":"load/projects/pandora/docs/eng/scenario/variable_source.md",
"docs/eng/tuturial.md":"load/projects/pandora/docs/eng/tuturial.md",
"docs/eng/startup.md":"load/projects/pandora/docs/eng/startup.md",
"docs/eng/tutorial.md":"load/projects/pandora/docs/eng/tutorial.md",
"docs/images/architecture.graphml":"load/projects/pandora/docs/images/architecture.graphml",
"docs/images/architecture.png":"load/projects/pandora/docs/images/architecture.png",
"docs/images/http_100kb_net.png":"load/projects/pandora/docs/images/http_100kb_net.png",
Expand All @@ -284,7 +285,8 @@
"docs/rus/scenario-grpc-generator.md":"load/projects/pandora/docs/rus/scenario-grpc-generator.md",
"docs/rus/scenario-http-generator.md":"load/projects/pandora/docs/rus/scenario-http-generator.md",
"docs/rus/scenario/variable_source.md":"load/projects/pandora/docs/rus/scenario/variable_source.md",
"docs/rus/tuturial.md":"load/projects/pandora/docs/rus/tuturial.md",
"docs/rus/startup.md":"load/projects/pandora/docs/rus/startup.md",
"docs/rus/tutorial.md":"load/projects/pandora/docs/rus/tutorial.md",
"examples/connect.yaml":"load/projects/pandora/examples/connect.yaml",
"examples/custom_pandora/custom.yaml":"load/projects/pandora/examples/custom_pandora/custom.yaml",
"examples/custom_pandora/custom_main.go":"load/projects/pandora/examples/custom_pandora/custom_main.go",
Expand Down
6 changes: 2 additions & 4 deletions docs/eng/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ Pandora is a set of components talking to each other through Go channels. There
Ammo Provider knows how to make an ammo object from an ammo file or other external resource. Instances get ammo objects
from Ammo Provider.

### Instances Pool
### Instance Pool

Instances Pool manages the creation of Instances. You can think of one Instance as a single user that sends requests to
a server sequentially. All Instances from one Instances Pool get their ammo from one Ammo Provider. Instances creation
times are controlled by Startup Scheduler. All Instances from one Instances Pool also have Guns of the same type.
Instance Pool manages the creation of Instances. You can think of one Instance as a single user that sends requests to a server sequentially. All Instances from one Instance Pool get their ammo from one Ammo Provider. Instances creation times are controlled by Startup Scheduler. All Instances from one Instance Pool also have Guns of the same type.

### Scheduler

Expand Down
37 changes: 32 additions & 5 deletions docs/eng/grpc-generator.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,46 @@ Full gRPC generator config

```yaml
gun:
type: http
type: grpc
target: '[hostname]:443'
timeout: 15s
tls: true
timeout: 15s # Grpc request timeout. Default: 15s
tls: false # If true, Pandora accepts any certificate presented by the server and any host name in that certificate. Default: false
dial_options:
timeout: 1s
authority: string
authority: some.host # Specifies the value to be used as the :authority pseudo-header and as the server name in authentication handshake
timeout: 1s # Timeout for dialing GRPC connect. Default: 1s
answlog:
enabled: true
path: ./answ.log
filter: all # all - all http codes, warning - log 4xx and 5xx, error - log only 5xx. Default: error
```
## Mapping Response Codes
Pandora uses the gRPC client from google.golang.org/grpc as a client (https://github.com/grpc/grpc-go)
But to unify reports it converts them into HTTP codes.
### Mapping table gPRC StatusCode -> HTTP StatusCode
| gRPC Status Name | gRPC Status Code | HTTP Status Code |
|--------------------|------------------|------------------|
| OK | 0 | 200 |
| Canceled | 1 | 499 |
| InvalidArgument | 3 | 400 |
| DeadlineExceeded | 4 | 504 |
| NotFound | 5 | 404 |
| AlreadyExists | 6 | 409 |
| PermissionDenied | 7 | 403 |
| ResourceExhausted | 8 | 429 |
| FailedPrecondition | 9 | 400 |
| Aborted | 10 | 409 |
| OutOfRange | 11 | 400 |
| Unimplemented | 12 | 501 |
| Unavailable 14 | 14 | 503 |
| Unauthenticated 16 | 16 | 401 |
| unknown | - | 500 |
---
[Home](index.md)
3 changes: 0 additions & 3 deletions docs/eng/load-profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@

To determine what load to create on the server, use a load profile. It sets how the load will be changed and maintained.

Most tools have their own formats for defining load profiles. When configuring a test via the UI, you can get the final profile by adding sections in the correct order.


## line

Linearly increases the load in a given range over a certain period of time.
Expand Down
4 changes: 2 additions & 2 deletions docs/eng/scenario-grpc-generator.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ The minimum generator configuration is as follows
```yaml
gun:
type: http/scenario
target: localhost:80
type: grpc/scenario
target: localhost:8888
```
For a scenario gRPC generator, all settings of a regular gRPC generator are supported [gRPC generator](grpc-generator.md)
Expand Down
93 changes: 93 additions & 0 deletions docs/eng/startup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
[Home](index.md)

---

# Instance startup profile

You can control the profile of instance starts.

Types of Instance startup profile:

- [once](#once)
- [const](#const)
- [instance_step](#instance_step)
- [composite](#composite)

#### Note: you cannot reduce the number of running instances

The startup profile only works to create instances. That is, Pandora does not delete instances until the test is complete.

## once

A specified number of instances are created once.

**Example**:

creating 10 instances at the start of this test section

```yaml
startup:
type: once
times: 10
```
## const
Creating instances at a certain speed.
**Example**:
creating 5 instances every second for 60 seconds. As a result, 300 instances will be created after 60 seconds
```yaml
startup:
type: const
duration: 60s
ops: 5
```
## instance_step
Creates instances in periodic increments.
**Example**:
10 instances are created every 10 seconds. As a result, 100 instances will be created after 100 seconds
```yaml
startup:
type: instance_step
from: 10
to: 100
step: 10
stepduration: 10s
```
## composite
Composite startup profile is a possibility of arbitrary combination of the above described profiles.
**Example**:
Implement a single step [instance_step](#instance_step) using once and const.
- 10 instances are created
- No instances are created within 10 seconds(_ops: 0_)
- 10 instances are created.
- As a result, 20 instances will be created and will run until the entire test is complete
```yaml
startup:
- type: once
times: 10
- type: const
ops: 0
duration: 10s
- type: once
times: 10
```
---
[Home](index.md)
File renamed without changes.
4 changes: 3 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ write your own load scenarios in Go, compiling them just before your test.

- [Installation](eng/install.md)
- [Configuration](eng/config.md)
- [Your first test](eng/tuturial.md)
- [Your first test](eng/tutorial.md)
- [Load profile](eng/load-profile.md)
- [Instance startup profile](eng/startup.md)
- [HTTP providers](eng/providers.md)
- [HTTP generators](eng/http-generator.md)
- [Scenario generator / HTTP](eng/scenario-http-generator.md)
- [gRPC generators](eng/grpc-generator.md)
- [Scenario generator / gRPC](eng/scenario-grpc-generator.md)
- [Custom guns](eng/custom.md)
- [Pandora’s performance](eng/performance.md)
Expand Down
9 changes: 5 additions & 4 deletions docs/rus/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ Pandora - это набор компонентов, взаимодействую
Ammo Provider знает, как создать объект Payload из payload файла (ammo file) или другого внешнего ресурса.
И их задача передать Payload Instance'у. См метод `func (p *Provider) Acquire() (core.Ammo, bool)`

### Instances Pool
### Instance Pool

Instances Pool manages the creation of Instances. You can think of one Instance as a single user that sends requests to
a server sequentially. All Instances from one Instances Pool get their ammo from one Ammo Provider. Instances creation
times are controlled by Startup Scheduler. All Instances from one Instances Pool also have Guns of the same type.
**Пул инстансов** управляет созданием **инстансов**. Один инстанс можно представить как одного пользователя, который
**последовательно** отправляет запросы на сервер. Все инстансы из одного пула инстансов получают данные от одного
**провайдера**. Время создания инстанса контролируется **планировщиком**. Все инстансы из одного пула инстансов имеют генераторы
одного типа.

### Scheduler

Expand Down
4 changes: 2 additions & 2 deletions docs/rus/custom.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Home](index.md)
[К содержанию](index.md)

---

Expand Down Expand Up @@ -452,4 +452,4 @@ func main() {

---

[Home](index.md)
[К содержанию](index.md)
39 changes: 33 additions & 6 deletions docs/rus/grpc-generator.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,46 @@

```yaml
gun:
type: http
type: grpc
target: '[hostname]:443'
timeout: 15s
tls: true
timeout: 15s # Таймаут для запросов gRPC. По умолчанию: 15s
tls: false # Если true, Pandora принимает любой сертификат, представленный сервером, и любое имя хоста в этом сертификате. По умолчанию: false
dial_options:
timeout: 1s
authority: string
authority: some.host # Указывает значение, которое будет использоваться в качестве псевдозаголовка :authority и имени сервера в процессе аутентификации.
timeout: 1s # Таймаут установки gRPC соединения. По умолчанию: 1s
answlog:
enabled: true
path: ./answ.log
filter: all # all - all http codes, warning - log 4xx and 5xx, error - log only 5xx. Default: error
filter: all # all - все http-коды, warning - логировать 4xx и 5xx, error - логировать только 5xx. По умолчанию: error
```
## Маппинг кодов ответа
В качестве клиента Пандора использует gRPC клиент от google.golang.org/grpc (https://github.com/grpc/grpc-go)
Но для унификации графиков преобразует их в HTTP коды.
### Таблица маппинга gPRC StatusCode -> HTTP StatusCode
| gRPC Status Name | gRPC Status Code | HTTP Status Code |
|--------------------|------------------|------------------|
| OK | 0 | 200 |
| Canceled | 1 | 499 |
| InvalidArgument | 3 | 400 |
| DeadlineExceeded | 4 | 504 |
| NotFound | 5 | 404 |
| AlreadyExists | 6 | 409 |
| PermissionDenied | 7 | 403 |
| ResourceExhausted | 8 | 429 |
| FailedPrecondition | 9 | 400 |
| Aborted | 10 | 409 |
| OutOfRange | 11 | 400 |
| Unimplemented | 12 | 501 |
| Unavailable 14 | 14 | 503 |
| Unauthenticated 16 | 16 | 401 |
| unknown | - | 500 |
---
[Домой](index.md)
4 changes: 3 additions & 1 deletion docs/rus/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ Pandora - это высокопроизводительный генератор

- [Установка](install.md)
- [Конфигурация](config.md)
- [Первый тест](tuturial.md)
- [Первый тест](tutorial.md)
- [Профиль нагрузки](load-profile.md)
- [Профиль создание инстансов](startup.md)
- [HTTP providers](providers.md)
- [HTTP генератор](http-generator.md)
- [Сценарный генератор / HTTP](scenario-http-generator.md)
- [gRPC генератор](grpc-generator.md)
- [Сценарный генератор / gRPC](scenario-grpc-generator.md)
- [Custom](custom.md)
- [Производительность Pandora](performance.md)
Expand Down
8 changes: 3 additions & 5 deletions docs/rus/load-profile.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
[Home](index.md)
[К содержанию](index.md)

---

# Профиль нагрузки

Чтобы определить, какую нагрузку подавать на сервер, используется профиль нагрузки. Профиль определяет, как будет изменяться и поддерживаться нагрузка.

В большинстве инструментов есть свои форматы для определения профиля нагрузки. При конфигурации теста через UI можно собрать итоговый профиль, добавляя участки в правильном порядке.

## line

Линейно увеличивает нагрузку в заданном диапазоне за определенный период времени.
Expand Down Expand Up @@ -55,9 +53,9 @@
Пример:

```
Передает столько запросов, сколько может принять цель в рамках установленных соединений без ограничений в течение указанного времени
{type: unlimited, duration: 30s}
```

---

[Home](index.md)
[К содержанию](index.md)
4 changes: 2 additions & 2 deletions docs/rus/performance.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Home](index.md)
[К содержанию](index.md)

---

Expand Down Expand Up @@ -102,4 +102,4 @@ to do this.

---

[Home](index.md)
[К содержанию](index.md)
4 changes: 2 additions & 2 deletions docs/rus/providers.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Home](index.md)
[К содержанию](index.md)

---

Expand Down Expand Up @@ -234,4 +234,4 @@ pools:
---
[Home](index.md)
[К содержанию](index.md)
4 changes: 2 additions & 2 deletions docs/rus/scenario-grpc-generator.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ pools:
```yaml
gun:
type: http/scenario
target: localhost:80
type: grpc/scenario
target: localhost:8888
```
Для сценарного генератора поддерживаются все настройки обычного [gRPC генератора](grpc-generator.md)
Expand Down
Loading

0 comments on commit 8b70505

Please sign in to comment.