Skip to content

Commit

Permalink
docs: update readme with screenshot and installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
uptickmetachu committed Jan 17, 2024
1 parent 9bab7b4 commit baf0a60
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,35 @@

This tool captures sql queries and uploads the query plan to postgresql explain visualizer (PEV) by [dalibo](https://explain.dalibo.com/). This is especially helpful for debugging slow queries.

This tool also exports a graphical UI similar to [pghero](https://github.com/ankane/pghero) but is embedded within your django app.

# Installation

1. `pip install django-pev`

2. Add to your urls

```
# urls.py
from django.urls import include, path
urlpatterns = [
# ....
path('django-pev/', include(('django_pev.urls', 'django_pev'), namespace='django_pev')),
]
```

3. Add to your installed apps
```
# settings.py
INSTALLED_APPS = [
# ...
"django_pev"
]
```

# Usage

Wrap some code with the explain context manager. All sql queries are captured
Expand Down
Binary file added screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit baf0a60

Please sign in to comment.