Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tyler36/ddev-dbslow
Helper to log "slow" queries
https://github.com/tyler36/ddev-dbslow
database ddev-get debugging mysql
Last synced: about 5 hours ago
JSON representation
Helper to log "slow" queries
- Host: GitHub
- URL: https://github.com/tyler36/ddev-dbslow
- Owner: tyler36
- License: apache-2.0
- Created: 2024-02-01T04:56:32.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-03-21T01:23:49.000Z (7 months ago)
- Last Synced: 2024-03-21T02:35:06.154Z (7 months ago)
- Topics: database, ddev-get, debugging, mysql
- Language: Shell
- Homepage:
- Size: 72.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![tests](https://github.com/tyler36/ddev-dbslow/actions/workflows/tests.yml/badge.svg)](https://github.com/tyler36/ddev-dbslow/actions/workflows/tests.yml) ![project is maintained](https://img.shields.io/maintenance/yes/2024.svg)
# dbslow
- [What is dbslow?](#what-is-dbslow)
- [Getting started](#getting-started)
- [Usage](#usage)
- [Starting and stopping](#starting-and-stopping)
- [Viewing](#viewing)
- [TODO](#todo)## What is dbslow?
This addon is designed to log slow queries (>1 second). Slow queries degrade site performance.
By tracking slow queries, developer gain insight to how the database is being used and specific areas to focus for improvement.This addon was inspired by [ChromaticHQ/ddev-dblog](https://github.com/ChromaticHQ/ddev-dblog). The main difference is
- `ddev-dblog` logs _all_ queries.
- `ddev-dbslow` logs queries slow queries (>1 second)As both addons mature, it is possible this functionality will merge into `ddev-dblog` or DDEV core.
## Getting started
1. Install the addon.
```shell
ddev get tyler36/dbslow
```2. Restart DDEV.
```shell
ddev restart
```## Usage
## Starting and stopping
- `ddev dbslow on`: Start logging slow queries.
- `ddev dbslow off`: Stop logging slow queries.
- `ddev dbslow toggle`: Toggle the current state of the logging. Ie. OFF => ON, ON => OFF.## Viewing
- `ddev dbslow view`: Display the log file.
- `ddev dbslow tail`: Stream the log file in the terminal.## TODO
- [ ] Add configuration options for settings.
- [ ] Add tests for `ddev dbslow tail`
- [ ] Add tests for MySQL
- [ ] Add support for Postgres**Contributed and maintained by [@tyler36](https://github.com/tyler36)**