You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-3Lines changed: 31 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,11 +65,13 @@ If you would like to run the node from source (which is really handy during deve
65
65
make help
66
66
```
67
67
68
-
You will need OpenSSL installed as well, see shorthand commands [here](https://github.com/sfackler/rust-openssl/issues/855#issuecomment-450057552). While running Ollama elsewhere (if you are using it) or with an OpenAI API key provided, you can run the compute node with:
68
+
You will need OpenSSL installed, see shorthand commands [here](https://github.com/sfackler/rust-openssl/issues/855#issuecomment-450057552).
69
69
70
70
```sh
71
-
make run # info-level logs
72
-
make debug # debug-level logs
71
+
cargo run
72
+
73
+
# specify custom .env file
74
+
DKN_COMPUTE_ENV=./path/to/.env cargo run
73
75
```
74
76
75
77
If you have a valid `.env` file, you can run the latest Docker image via compose as well:
@@ -112,6 +114,32 @@ make lint # clippy
112
114
make format # rustfmt
113
115
```
114
116
117
+
### Profiling
118
+
119
+
We have scripts to profile both CPU and Memory usage. A special build is created for profiling, via a custom `profiling` feature, such that the output inherits `release` mode but also has debug symbols.
120
+
121
+
Furthermore, the profiling build will exit automatically after a certain time, as if CTRL+C has been pressed. This is needed by the memory profiling tool in particular.
122
+
123
+
**CPU Profiling**: To create a [flamegraph](https://crates.io/crates/flamegraph) of the application, the command below will create a profiling build that inherits `release` mode, except with debug information:
0 commit comments