# Profiling

AppFlowy uses [tokio-console](https://github.com/tokio-rs/console) to debug the Rust backend. It would be very useful when having the high CPU usage issues.

## Prerequisites

Install the tokio-console by running the following command

```shell
cargo install --locked tokio-console
```

and run locally

```shell
tokio-console
```

## Enable profiling

The `flowy-core` crate has a feature called `profiling`. Just enable this feature in the cargo.toml.

### Profiling with Tauri

![img.png](https://1003959744-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvs4LQcuzr0JR34ApS5sM%2Fuploads%2Fgit-blob-dfe17178bd823e3263e79c03d2940b37dc36805f%2Fenable_profiling_in_tauri.png?alt=media)

The profiling data will be displayed in terminal after the application run.

![img.png](https://1003959744-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvs4LQcuzr0JR34ApS5sM%2Fuploads%2Fgit-blob-9733b1dcb43aeb928488513cd52334029ab8af63%2Fconsole_tauri.png?alt=media)

### Profiling with Flutter

WIP
