Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
pawurb committed Nov 22, 2024
1 parent 7dac796 commit 6b38549
Showing 1 changed file with 30 additions and 29 deletions.
59 changes: 30 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 6b38549

Please sign in to comment.