diff options
author | Alberto Sartori <alberto.sartori@huawei.com> | 2023-02-27 10:27:52 +0100 |
---|---|---|
committer | Alberto Sartori <alberto.sartori@huawei.com> | 2023-03-10 09:38:39 +0100 |
commit | 55ba09ec97d2449b39d7fcc38c346969168d899b (patch) | |
tree | 4c97affeaae2e5bb88a41be6d389b2502bae6e24 /src/buildtool/common/cli.hpp | |
parent | 117a1dbf099d93dfe044971f90203a5d8d1975b4 (diff) | |
download | justbuild-55ba09ec97d2449b39d7fcc38c346969168d899b.tar.gz |
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.
Diffstat (limited to 'src/buildtool/common/cli.hpp')
-rw-r--r-- | src/buildtool/common/cli.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
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<std::filesystem::path> info_file{std::nullopt}; std::optional<std::string> interface{std::nullopt}; std::optional<std::string> pid_file{std::nullopt}; + std::optional<uint8_t> 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 |