February 23, 2019
Is there a way to get information about the current process?
Memory usage, CPU usage, PID.
February 23, 2019
On Saturday, 23 February 2019 at 20:49:49 UTC, r-const-dev wrote:
> Is there a way to get information about the current process?
> Memory usage, CPU usage, PID.

The PID is easy, from std.process it's a standard function call away: https://dlang.org/phobos/std_process.html#.thisProcessID

I don't think there is anything in phobos about memory or cpu usage. If you're on GNU/Linux you can probe /proc/self/stat and /proc/self/status to get that information, I don't know about windows.