Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Adding New Configuration Parameters

Andy Pavlo edited this page Jul 26, 2017 · 2 revisions

With new configuration manager, you can define new configurations and modify them in src/include/configuration/configuration.h, using macros CONFIG_* and REGISTER which are similar to those in gflags.

Define a new configuration

There are two steps needed to define a configuration:

  1. Using CONFIG_* to define the configuration, for example:

    CONFIG_int(name, description, default_value, is_mutable, is_persistent)

    CONFIG_int(port, "Peloton port (default: 15721)", 15721, false, false);

  2. Register the configuration in register_parameters() at the bottom of configuration.h:

    void register_parameters() { REGISTER(port); ... }

Clone this wiki locally