From 55ba09ec97d2449b39d7fcc38c346969168d899b Mon Sep 17 00:00:00 2001 From: Alberto Sartori Date: Mon, 27 Feb 2023 10:27:52 +0100 Subject: execution service: implement WaitExecution and google::longrunning::Operations::GetOperation For each action that is executed, an entry is added to a shared thread safe cache. Once the number of operations stored exceeds twice 2^n, where n is given by the option --log-operations-threshold, at most 2^n operations will be removed, in a FIFO scheme. --- src/buildtool/common/cli.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/buildtool/common/cli.hpp') diff --git a/src/buildtool/common/cli.hpp b/src/buildtool/common/cli.hpp index da67d8e7..5590534a 100644 --- a/src/buildtool/common/cli.hpp +++ b/src/buildtool/common/cli.hpp @@ -150,6 +150,7 @@ struct ExecutionServiceArguments { std::optional info_file{std::nullopt}; std::optional interface{std::nullopt}; std::optional pid_file{std::nullopt}; + std::optional op_exponent; }; static inline auto SetupCommonArguments( @@ -549,5 +550,13 @@ static inline auto SetupExecutionServiceArguments( es_args->pid_file, "Write pid to this file in plain txt. If the file exists, it " "will be overwritten."); + + app->add_option( + "--log-operations-threshold", + es_args->op_exponent, + "Once the number of operations stored exceeds twice 2^n, where n is " + "given by the option --log-operations-threshold, at most 2^n " + "operations will be removed, in a FIFO scheme. If unset, defaults to " + "14. Must be in the range [0,255]"); } #endif // INCLUDED_SRC_BUILDTOOL_COMMON_CLI_HPP -- cgit v1.2.3