1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 09:11:47 +02:00

worker protocol: serialise cgroup stats in BuildResult (#9598)

By doing so, they get reported when building through the daemon via either `unix://` or `ssh-ng://`.
This commit is contained in:
Ramses 2023-12-13 22:37:17 +01:00 committed by GitHub
parent e6515bd47b
commit 1e3d811840
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 101 additions and 8 deletions

View file

@ -1,6 +1,8 @@
#pragma once
///@file
#include <chrono>
#include "common-protocol.hh"
namespace nix {
@ -9,7 +11,7 @@ namespace nix {
#define WORKER_MAGIC_1 0x6e697863
#define WORKER_MAGIC_2 0x6478696f
#define PROTOCOL_VERSION (1 << 8 | 36)
#define PROTOCOL_VERSION (1 << 8 | 37)
#define GET_PROTOCOL_MAJOR(x) ((x) & 0xff00)
#define GET_PROTOCOL_MINOR(x) ((x) & 0x00ff)
@ -214,6 +216,8 @@ template<>
DECLARE_WORKER_SERIALISER(UnkeyedValidPathInfo);
template<>
DECLARE_WORKER_SERIALISER(std::optional<TrustedFlag>);
template<>
DECLARE_WORKER_SERIALISER(std::optional<std::chrono::microseconds>);
template<typename T>
DECLARE_WORKER_SERIALISER(std::vector<T>);