mirror of
https://github.com/italicsjenga/valence.git
synced 2024-12-24 06:51:30 +11:00
2597e92b8f
Moves all the packages to the `crates/` directory.
33 lines
858 B
Markdown
33 lines
858 B
Markdown
# Performance Tests
|
|
|
|
Run the server
|
|
|
|
```shell
|
|
cargo r -r -p bench_players
|
|
```
|
|
|
|
In a separate terminal, start [rust-mc-bot](https://github.com/Eoghanmc22/rust-mc-bot).
|
|
This command should connect 1000 clients to the server.
|
|
|
|
```shell
|
|
# In the rust-mc-bot directory
|
|
cargo r -r -- 127.0.0.1:25565 1000
|
|
```
|
|
|
|
If the delta time is consistently >50ms, the server is running behind schedule.
|
|
|
|
Note:
|
|
|
|
# Flamegraph
|
|
|
|
To start capturing a [flamegraph](https://github.com/flamegraph-rs/flamegraph),
|
|
run the server like this:
|
|
|
|
```shell
|
|
# You can also try setting the `CARGO_PROFILE_RELEASE_DEBUG` environment variable to `true`.
|
|
cargo flamegraph -p bench_players
|
|
```
|
|
|
|
Run rust-mc-bot as above, and then stop the server after a few seconds. Flamegraph will generate a flamegraph.svg in the
|
|
current directory. You can then open that file in your internet browser of choice.
|