https://github.com/absolucy/byond-memorystats
simple library to get memory stats from DreamDaemon at runtime
https://github.com/absolucy/byond-memorystats
byond byond-dll rust rust-lang rust-lib
Last synced: 2 months ago
JSON representation
simple library to get memory stats from DreamDaemon at runtime
- Host: GitHub
- URL: https://github.com/absolucy/byond-memorystats
- Owner: Absolucy
- License: mpl-2.0
- Created: 2024-12-07T05:45:38.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-02-03T09:55:08.000Z (4 months ago)
- Last Synced: 2025-04-03T11:45:38.842Z (2 months ago)
- Topics: byond, byond-dll, rust, rust-lang, rust-lib
- Language: Rust
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# byond-memorystats
This is a simple library to programatically get the memory stats from DreamDaemon for a running BYOND server.
Normally, you can only get this string through the DreamDaemon UI on Windows, sending the SIGUSR2 signal on Linux, or the "interactive console", but this allows you to get the same string at runtime, by calling the external library.
Pre-built binaries are available through the "Build Binaries" github action runs.
## Usage
Usage is simple:
```dm
// memorystats.dll on Windows, libmemorystats.so on Linux
var/stats = call_ext(world.system_type == MS_WINDOWS ? "./memorystats.dll" : "./libmemorystats.so", "memory_stats")()
```It will return a string in this format:
```
Server mem usage:
prototypes:
obj: 3.32 KB (20)
mob: 16 B (1)
proc: 10.7 KB (69)
str: 25.3 KB (635)
appearance: 0 B (0)
filter: 0 B (0)
id array: 13.6 KB (147)
map: 8 KB (0,0,0)
objects:
mobs: 0 B (0)
objs: 0 B (0)
datums: 0 B (0)
images: 0 B (0)
lists: 56 B (2)
procs: 688 B (2)
```## License
byond-memorystats is licensed under the [Mozilla Public License Version 2.0 (MPL-2.0)](LICENSE.md)