to calculate or process doesn't exist.
Example:
auto energy = processEnergyUsage(1234, 5.seconds);
writeln("Process consumed ", energy, " joules");double processEnergyUsage(int pid, Duration window)Estimates energy usage for a specific process.
This function provides an estimate of energy consumed by a process over the specified time window. This is an approximation based on CPU usage and system power characteristics.
pid | Process ID to analyze. |
window | Time window for energy calculation (not currently used). |
to calculate or process doesn't exist.
Example:
auto energy = processEnergyUsage(1234, 5.seconds);
writeln("Process consumed ", energy, " joules");