Skip to content

Commit

Permalink
docs change structure
Browse files Browse the repository at this point in the history
97b5bf78d918f8113e5d5f8dbf98912671c95ac1
  • Loading branch information
oke11o committed Jul 12, 2024
1 parent 2084f86 commit dc6574a
Show file tree
Hide file tree
Showing 38 changed files with 194 additions and 123 deletions.
56 changes: 30 additions & 26 deletions .mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,51 +272,55 @@
"docs/assets/scss/_variables_project.scss":"load/projects/pandora/docs/assets/scss/_variables_project.scss",
"docs/config.yaml":"load/projects/pandora/docs/config.yaml",
"docs/content/en/_index.md":"load/projects/pandora/docs/content/en/_index.md",
"docs/content/en/architecture.md":"load/projects/pandora/docs/content/en/architecture.md",
"docs/content/en/best-practices/_index.md":"load/projects/pandora/docs/content/en/best-practices/_index.md",
"docs/content/en/best-practices/discard-overflow.md":"load/projects/pandora/docs/content/en/best-practices/discard-overflow.md",
"docs/content/en/best-practices/rps-per-instance.md":"load/projects/pandora/docs/content/en/best-practices/rps-per-instance.md",
"docs/content/en/best-practices/shared-client.md":"load/projects/pandora/docs/content/en/best-practices/shared-client.md",
"docs/content/en/config.md":"load/projects/pandora/docs/content/en/config.md",
"docs/content/en/custom.md":"load/projects/pandora/docs/content/en/custom.md",
"docs/content/en/grpc-generator.md":"load/projects/pandora/docs/content/en/grpc-generator.md",
"docs/content/en/http-generator.md":"load/projects/pandora/docs/content/en/http-generator.md",
"docs/content/en/install.md":"load/projects/pandora/docs/content/en/install.md",
"docs/content/en/generator/_index.md":"load/projects/pandora/docs/content/en/generator/_index.md",
"docs/content/en/generator/custom.md":"load/projects/pandora/docs/content/en/generator/custom.md",
"docs/content/en/generator/grpc-generator.md":"load/projects/pandora/docs/content/en/generator/grpc-generator.md",
"docs/content/en/generator/http-generator.md":"load/projects/pandora/docs/content/en/generator/http-generator.md",
"docs/content/en/generator/scenario-grpc-generator.md":"load/projects/pandora/docs/content/en/generator/scenario-grpc-generator.md",
"docs/content/en/generator/scenario-http-generator.md":"load/projects/pandora/docs/content/en/generator/scenario-http-generator.md",
"docs/content/en/generator/scenario/_index.md":"load/projects/pandora/docs/content/en/generator/scenario/_index.md",
"docs/content/en/generator/scenario/functions.md":"load/projects/pandora/docs/content/en/generator/scenario/functions.md",
"docs/content/en/generator/scenario/locals.md":"load/projects/pandora/docs/content/en/generator/scenario/locals.md",
"docs/content/en/generator/scenario/variable_source.md":"load/projects/pandora/docs/content/en/generator/scenario/variable_source.md",
"docs/content/en/get-started/_index.md":"load/projects/pandora/docs/content/en/get-started/_index.md",
"docs/content/en/get-started/architecture.md":"load/projects/pandora/docs/content/en/get-started/architecture.md",
"docs/content/en/get-started/config.md":"load/projects/pandora/docs/content/en/get-started/config.md",
"docs/content/en/get-started/install.md":"load/projects/pandora/docs/content/en/get-started/install.md",
"docs/content/en/get-started/tutorial.md":"load/projects/pandora/docs/content/en/get-started/tutorial.md",
"docs/content/en/load-profile.md":"load/projects/pandora/docs/content/en/load-profile.md",
"docs/content/en/performance.md":"load/projects/pandora/docs/content/en/performance.md",
"docs/content/en/providers.md":"load/projects/pandora/docs/content/en/providers.md",
"docs/content/en/scenario-grpc-generator.md":"load/projects/pandora/docs/content/en/scenario-grpc-generator.md",
"docs/content/en/scenario-http-generator.md":"load/projects/pandora/docs/content/en/scenario-http-generator.md",
"docs/content/en/scenario/_index.md":"load/projects/pandora/docs/content/en/scenario/_index.md",
"docs/content/en/scenario/functions.md":"load/projects/pandora/docs/content/en/scenario/functions.md",
"docs/content/en/scenario/locals.md":"load/projects/pandora/docs/content/en/scenario/locals.md",
"docs/content/en/scenario/variable_source.md":"load/projects/pandora/docs/content/en/scenario/variable_source.md",
"docs/content/en/search.md":"load/projects/pandora/docs/content/en/search.md",
"docs/content/en/startup.md":"load/projects/pandora/docs/content/en/startup.md",
"docs/content/en/tutorial.md":"load/projects/pandora/docs/content/en/tutorial.md",
"docs/content/ru/_index.md":"load/projects/pandora/docs/content/ru/_index.md",
"docs/content/ru/architecture.md":"load/projects/pandora/docs/content/ru/architecture.md",
"docs/content/ru/best-practices/_index.md":"load/projects/pandora/docs/content/ru/best-practices/_index.md",
"docs/content/ru/best-practices/discard-overflow.md":"load/projects/pandora/docs/content/ru/best-practices/discard-overflow.md",
"docs/content/ru/best-practices/rps-per-instance.md":"load/projects/pandora/docs/content/ru/best-practices/rps-per-instance.md",
"docs/content/ru/best-practices/shared-client.md":"load/projects/pandora/docs/content/ru/best-practices/shared-client.md",
"docs/content/ru/config.md":"load/projects/pandora/docs/content/ru/config.md",
"docs/content/ru/custom.md":"load/projects/pandora/docs/content/ru/custom.md",
"docs/content/ru/grpc-generator.md":"load/projects/pandora/docs/content/ru/grpc-generator.md",
"docs/content/ru/http-generator.md":"load/projects/pandora/docs/content/ru/http-generator.md",
"docs/content/ru/install.md":"load/projects/pandora/docs/content/ru/install.md",
"docs/content/ru/generator/_index.md":"load/projects/pandora/docs/content/ru/generator/_index.md",
"docs/content/ru/generator/custom.md":"load/projects/pandora/docs/content/ru/generator/custom.md",
"docs/content/ru/generator/grpc-generator.md":"load/projects/pandora/docs/content/ru/generator/grpc-generator.md",
"docs/content/ru/generator/http-generator.md":"load/projects/pandora/docs/content/ru/generator/http-generator.md",
"docs/content/ru/generator/scenario-grpc-generator.md":"load/projects/pandora/docs/content/ru/generator/scenario-grpc-generator.md",
"docs/content/ru/generator/scenario-http-generator.md":"load/projects/pandora/docs/content/ru/generator/scenario-http-generator.md",
"docs/content/ru/generator/scenario/_index.md":"load/projects/pandora/docs/content/ru/generator/scenario/_index.md",
"docs/content/ru/generator/scenario/functions.md":"load/projects/pandora/docs/content/ru/generator/scenario/functions.md",
"docs/content/ru/generator/scenario/locals.md":"load/projects/pandora/docs/content/ru/generator/scenario/locals.md",
"docs/content/ru/generator/scenario/variable_source.md":"load/projects/pandora/docs/content/ru/generator/scenario/variable_source.md",
"docs/content/ru/get-started/_index.md":"load/projects/pandora/docs/content/ru/get-started/_index.md",
"docs/content/ru/get-started/architecture.md":"load/projects/pandora/docs/content/ru/get-started/architecture.md",
"docs/content/ru/get-started/config.md":"load/projects/pandora/docs/content/ru/get-started/config.md",
"docs/content/ru/get-started/install.md":"load/projects/pandora/docs/content/ru/get-started/install.md",
"docs/content/ru/get-started/tutorial.md":"load/projects/pandora/docs/content/ru/get-started/tutorial.md",
"docs/content/ru/load-profile.md":"load/projects/pandora/docs/content/ru/load-profile.md",
"docs/content/ru/performance.md":"load/projects/pandora/docs/content/ru/performance.md",
"docs/content/ru/providers.md":"load/projects/pandora/docs/content/ru/providers.md",
"docs/content/ru/scenario-grpc-generator.md":"load/projects/pandora/docs/content/ru/scenario-grpc-generator.md",
"docs/content/ru/scenario-http-generator.md":"load/projects/pandora/docs/content/ru/scenario-http-generator.md",
"docs/content/ru/scenario/_index.md":"load/projects/pandora/docs/content/ru/scenario/_index.md",
"docs/content/ru/scenario/functions.md":"load/projects/pandora/docs/content/ru/scenario/functions.md",
"docs/content/ru/scenario/locals.md":"load/projects/pandora/docs/content/ru/scenario/locals.md",
"docs/content/ru/scenario/variable_source.md":"load/projects/pandora/docs/content/ru/scenario/variable_source.md",
"docs/content/ru/search.md":"load/projects/pandora/docs/content/ru/search.md",
"docs/content/ru/startup.md":"load/projects/pandora/docs/content/ru/startup.md",
"docs/content/ru/tutorial.md":"load/projects/pandora/docs/content/ru/tutorial.md",
"docs/docsy.work":"load/projects/pandora/docs/docsy.work",
"docs/docsy.work.sum":"load/projects/pandora/docs/docsy.work.sum",
"docs/go.mod":"load/projects/pandora/docs/go.mod",
Expand Down
6 changes: 6 additions & 0 deletions docs/content/en/generator/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Generators
description: Pandora generators support different protocols
categories: [Generator]
weight: 2
---
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@ title: Custom guns
description: Custom guns
categories: [Generator]
tags: [generator]
weight: 11
weight: 99
---

- [Basic tutorial](#basic-tutorial)
- [gRPC](#grpc)
- [Websockets](#websockets)

## Basic tutorial

You can create you own Golang-based gun with _pandora_.
Expand All @@ -19,8 +15,8 @@ There is an example of custom gun shooting via gRPC.
We create a new gun and define `shoot` method for it w/ our test logic.

You can find examples of custom guns' code below:
- [gRPC](#gRPC)
- [Websockets](#Websockets)
- [gRPC](#gRPC)
- [Websockets](#Websockets)

Now it's time to compile our gun. Install deps and compile your custom gun file (`go build my_custom_gun.go`).

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions docs/content/en/get-started/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Get started
description: Quick start with Yandex Pandora
categories: [Get started]
weight: 1
---
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/content/en/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ It is a good idea to optimize your scenarios.
Go has `a lot <https://github.com/golang/go/wiki/Performance>`_ of tools helping you
to do this.

.. note:: We used JSON-formatted ammo to specify parameters for each scenario run.
> We used JSON-formatted ammo to specify parameters for each scenario run.
* **Small requests** 35k RPS. OK.
* **Some scenario steps with big JSON bodies** 35k RPS. OK.
Expand Down
6 changes: 3 additions & 3 deletions docs/content/en/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ List of built-in HTTP Ammo middleware:

- header/date

You can create your own middleware. But in order to do that you need to register them in custom pandora
You can create your own middleware. But in order to do that you need to register them in [custom pandora](generator/custom.md)

```go
import (
Expand All @@ -203,7 +203,7 @@ httpRegister.HTTPMW("header/date", func (cfg headerdate.Config) (middleware.Midd
})
```

For more on how to write custom pandora, see [Custom](custom.md).
For more on how to write custom pandora, see [Custom](generator/custom.md).

### HTTP Ammo preloaded

Expand All @@ -212,7 +212,7 @@ instance.

If you have **large requests** and **a large number of instances**, Pandora starts using a lot of memory.

For this case HTTP providers has a ``preload`` flag. If it's set to ``true``, the provider will load the ammo file into
For this case HTTP providers has a `preload` flag. If it's set to `true`, the provider will load the ammo file into
memory and use the body of the request from memory

Example:
Expand Down
6 changes: 6 additions & 0 deletions docs/content/ru/generator/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Генераторы
description: Используйте различные генераторы для разных протоколов
categories: [Get started]
weight: 2
---
26 changes: 13 additions & 13 deletions docs/content/ru/custom.md → docs/content/ru/generator/custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@ title: Custom guns
description: Custom guns
categories: [Generator]
tags: [generator]
weight: 11
weight: 99
---

## Basic tutorial
## Основы

You can create you own Golang-based gun with _pandora_.
Вы можете создать свою собственный генератор на базе Golang с помощью _pandora_.

There is an example of custom gun shooting via gRPC.
Здесь приведен пример стрельбы из пользовательской генератора через gRPC.

We create a new gun and define `shoot` method for it w/ our test logic.
Мы создаем новый генератор и определяем для нее метод `shoot` в нашей тестовой логике.

You can find examples of custom guns' code below:
- [gRPC](#gRPC)
- [Websockets](#Websockets)
Примеры кода пользовательских пушек вы можете найти ниже:
- [gRPC](#gRPC)
- [Websockets](#Websockets)

Now it's time to compile our gun. Install deps and compile your custom gun file (`go build my_custom_gun.go`).
Теперь пришло время скомпилировать наш генератор. Установите deps и скомпилируйте файл вашей пользовательского генератора (`go build my_custom_gun.go`).

After that step you'll get `my_custom_gun` binary file, it is compiled pandora with your custom gun inside.
После этого шага вы получите бинарный файл `my_custom_gun`, это скомпилированная pandora с вашей пользовательским генератором внутри.

Now its time to create `load.yaml`:
Теперь пришло время создать `load.yaml`:

```yaml
pools:
Expand All @@ -45,15 +45,15 @@ pools:
log:
```
And create ammofile `./json.ammo`:
И создать файл payload `./json.ammo`:

```json
{"tag": "/MyCase1", "Param1": "146837693,146837692,146837691"}
{"tag": "/MyCase2", "Param2": "555", "Param1": "500002"}
```


We are ready to shoot. Try it.
Теперь можно написать код генератора


## gRPC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: gRPC генератор
description: Настройка grpc генератора
categories: [Generator]
tags: [generator, grpc]
weight: 8
weight: 2
---

Полный конфиг grpc генератора
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: HTTP генератор
description: Настройка http/http2 генератора
categories: [Config]
tags: [config, docs, http]
weight: 9
categories: [Generator]
tags: [generator, http]
weight: 1
---

Полный конфиг http (http2) генератора
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Scenario generator / gRPC
description: Scenario generator / gRPC
categories: [generator]
tags: [scenario, generator, grpc]
weight: 10
weight: 4
---

## Конфигурация
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Scenario generator / HTTP
description: Scenario generator / HTTP
categories: [generator]
tags: [scenario, generator, http]
weight: 9
weight: 3
---

## Конфигурация
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
title: Сценарии
linkTitle: Сценарии
description: Общие настройки в сценарных генераторах
weight: 11
weight: 90
---
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions docs/content/ru/get-started/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Знакомство
description: Знакомство с генератором нагрузки Yandex Pandora
categories: [Get started]
weight: 1
---
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
25 changes: 12 additions & 13 deletions docs/content/ru/performance.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
---
title: Производительность Pandora
description: Результаты тестов производительности
categories: [Best practise]
categories: [Best practices]
tags: [config, test, performance]
weight: 13
---

[Alexander Ivanov](mailto:[email protected]) made some performance tests for the gun itself. Here are the results.
[Александр Иванов](mailto:[email protected]) провел несколько тестов производительности. Вот результаты.

* Server: NGinx, 32 cores, 64G RAM.
* Tank: 32 cores, 128G RAM.
* Network: 1G.

## HTTP requests to nginx
## HTTP запросы в nginx


Static pages with different sizes. Server delays implemented in Lua script, we can
set delay time using `sleep` query parameter:
Статические страницы разных размеров. Задержки сервера реализованы в скрипте Lua, мы можем
установить время задержки с помощью параметра запроса `sleep`:

```lua
server {
Expand Down Expand Up @@ -83,16 +83,15 @@ server {



## Custom scenarios
## Пользовательские сценарии

Производительность пользовательских сценариев во многом зависит от их реализации. В некоторых наших
тестах мы наблюдали скачки, вызванные GC. Их можно избежать, уменьшив размер распределения.
Хорошей идеей будет оптимизировать ваши сценарии.
В Go есть множество <https://github.com/golang/go/wiki/Performance>`_ инструментов, помогающих вам
сделать это.

Custom scenarios performance depends very much of their implementation. In some our
test we saw spikes caused by GC. They can be avoided by reducing allocation size.
It is a good idea to optimize your scenarios.
Go has `a lot <https://github.com/golang/go/wiki/Performance>`_ of tools helping you
to do this.

.. note:: We used JSON-formatted ammo to specify parameters for each scenario run.
> Мы использовали payload в формате JSON для задания параметров для каждого сценария.
* **Small requests** 35k RPS. OK.
* **Some scenario steps with big JSON bodies** 35k RPS. OK.
Expand Down
Loading

0 comments on commit dc6574a

Please sign in to comment.