mirror of
https://github.com/NixOS/nix
synced 2025-06-29 10:31:15 +02:00
Get CPU stats from the cgroup
This commit is contained in:
parent
20f66c6889
commit
fa68eb367e
6 changed files with 71 additions and 11 deletions
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include <string>
|
||||
#include <chrono>
|
||||
|
||||
#include <optional>
|
||||
|
||||
namespace nix {
|
||||
|
||||
|
@ -78,6 +78,9 @@ struct BuildResult
|
|||
was repeated). */
|
||||
time_t startTime = 0, stopTime = 0;
|
||||
|
||||
/* User and system CPU time the build took. */
|
||||
std::optional<std::chrono::microseconds> cpuUser, cpuSystem;
|
||||
|
||||
bool success()
|
||||
{
|
||||
return status == Built || status == Substituted || status == AlreadyValid || status == ResolvesToAlreadyValid;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue