You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+43-9Lines changed: 43 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,11 @@
10
10
-[Build](#build)
11
11
-[Configuration](#configuration)
12
12
-[Creating the Extension](#creating-the-extension)
13
+
-[Tests] (#tests)
13
14
-[Settings](#settings)
14
15
-[Usage](#usage)
15
16
-[Usage Examples](#usage-examples)
17
+
-[Code branching model](#code-branching-model)
16
18
17
19
# pg_uprobe
18
20
A PostgreSQL extension designed for tracing and analyzing queries executed within a session. This extension allows to capture and log information about running queries inside session. The collected information can retrieve heavy operations and most consumed resources during the execution of specific SQL queries.
We recommend installation in a dedicated schema. All objects will be created in the schema specified by the `SCHEMA` clause. If you do not want to specify the schema qualifier when using the extension, consider modifying the `search_path` parameter.
151
157
158
+
## Tests
159
+
The tests are written in Python using the testgres framework. To run the tests, you need to install the testgres package for Python and set the PG_CONFIG environment variable to the path to the pg_config executable of your PostgreSQL installation.
160
+
Running tests:
161
+
162
+
```shell
163
+
make PG_CONFIG=/opt/pgpro/ent-15/bin/pg_config python_tests
164
+
```
165
+
152
166
## Settings
153
167
154
168
-**pg_uprobe.data_dir** - Path to the directory where the session trace results file and function profiling results files are created. Default: `$PGDATA/pg_uprobe`
@@ -171,6 +185,9 @@ Simple example of [session tracing](doc/example_trace_session.md)
171
185
172
186
Simple example of [profiling PostgreSQL functions](doc/example_profile_func.md)
173
187
188
+
## Code branching model
189
+
190
+
**GitFlow** is used as the main code branching model in the git repository.
|ARM 64-битные|aarch64|arm64|| Не тестировалось, но библиотека Frida поддерживает данную архитектуру
246
+
247
+
(Мы работаем над поддержкой большего количества архитектур)
226
248
227
249
Поддерживаемые операционные системы:
228
250
- Linux
251
+
- FreeBSD
229
252
230
253
### Трассирование сеансов
231
254
При трассировании сеансов время выполнения запросов может увеличиться. В наших измерениях скорость выполнения падает на ~5%. Поэтому не стоит оставлять трассирование сеансов на длительное время. Этот инструмент предназначен, в первую очередь, для исследования проблемы, а не её обнаружения.
Все объекты будут созданы в схеме, определенной предложением SCHEMA. Рекомендуется установка в выделенную схему где расширение создаст свои собственные функции. Если вы не хотите указывать квалификатор схемы при использовании расширения, рассмотрите возможность изменения параметра search_path.
306
328
329
+
## Способы тестирования
330
+
Тесты написаны на языке Python с использованием фреймворка testgres. Для запуска тестов необходимо установить пакет testgres для Python и установить переменную окружения PG_CONFIG в путь до исполняемого файла pg_config вашего установленного PostgreSQL.
331
+
Запуск тестов:
332
+
333
+
```shell
334
+
make PG_CONFIG=/opt/pgpro/ent-15/bin/pg_config python_tests
335
+
```
336
+
307
337
## Настройки
308
338
309
339
-**pg_uprobe.data_dir** - Путь к каталогу, в котором будет создаваться файл с результатами трассирования сеанса и файлы с результатами профилирования функций. По умолчанию: `$PGDATA/pg_uprobe`
0 commit comments