Skip to content

Commit

Permalink
add threads ration to kphp config
Browse files Browse the repository at this point in the history
  • Loading branch information
Vadim Sadokhov committed Aug 23, 2023
1 parent f2e2598 commit 50fc281
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/pipes/register-kphp-configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ void RegisterKphpConfiguration::handle_constant_runtime_options(const ClassMembe
} else if (vk::any_of_equal(*opt_key,
warmup_workers_part_key_, warmup_instance_cache_elements_part_key_, warmup_timeout_sec_key_,
oom_handling_memory_ratio_key_, mysql_db_name_key_, job_workers_shared_memory_distribution_weights_,
thread_pool_size_key_)) {
thread_pool_ratio_key_, thread_pool_size_key_)) {
generic_register_simple_option(opt_pair->value(), *opt_key);
} else {
kphp_error(0, fmt_format("Got unexpected option {}::{}['{}']",
Expand Down
1 change: 1 addition & 0 deletions compiler/pipes/register-kphp-configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class RegisterKphpConfiguration final : public SyncPipeF<FunctionPtr> {

const vk::string_view job_workers_shared_memory_distribution_weights_{"--job-workers-shared-memory-distribution-weights"};

const vk::string_view thread_pool_ratio_key_{"--thread-pool-ratio"};
const vk::string_view thread_pool_size_key_{"--thread-pool-size"};
public:
void execute(FunctionPtr function, DataStream<FunctionPtr> &unused_os) final;
Expand Down
1 change: 1 addition & 0 deletions tests/phpt/kphp_configuration/10_thread_pool_size.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
class KphpConfiguration {
const DEFAULT_RUNTIME_OPTIONS = [
"--thread-pool-size" => "10",
"--thread-pool-ratio" => "0.42",
];
}

Expand Down

0 comments on commit 50fc281

Please sign in to comment.