diff --git a/README.md b/README.md index 288e511..628932b 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,36 @@ $ pgextras cache_hit +----------------+------------------------+ ``` +## Diagnose Report + +The simplest way to start using pg-extras is to execute a `diagnose` method. It runs a set of checks and prints out a report highlighting areas that may require additional investigation: + +```bash +pgextras diagnose +``` + +![Diagnose report](pg-extras-diagnose-report.png) + +## Web UI + +Alternatively, you can use the application via the web UI. You have to enable the `web` feature flag: + +```bash +cargo install pg-extras --features="web" +``` + +Now you can run: + +``` +pgextras web +``` + +To launch the dashboard on `http://localhost:3000` (you can customize the port by setting the `PORT` ENV). + +![Web UI](pg-extras-web-ui.png) + +Keep reading to learn about methods that `diagnose` uses under the hood. + ## Dependencies `calls` and `outliers` queries require [pg_stat_statements](https://www.postgresql.org/docs/current/pgstatstatements.html) extension. @@ -112,35 +142,6 @@ cache_hit(Some("other_schema".to_string)).await?; You can customize the default `public` schema by setting `ENV['PG_EXTRAS_SCHEMA']` value. -## Diagnose Report - -The simplest way to start using pg-extras is to execute a `diagnose` method. It runs a set of checks and prints out a report highlighting areas that may require additional investigation: - -```bash -pgextras diagnose -``` - -![Diagnose report](pg-extras-diagnose-report.png) - -## Web UI - -Alternatively, you can use the application via the web UI. You have to enable the `web` feature flag: - -```bash -cargo install pg-extras --features="web" -``` - -Now you can run: - -``` -pgextras web -``` - -To run the dashboard on `http://localhost:3000` (you can customize the port by setting the `PORT` ENV). - -![Web UI](pg-extras-web-ui.png) - -Keep reading to learn about methods that `diagnose` uses under the hood. ## Available methods