Users can configure daphne either via cli arguments or providing a .json configuration file:
./bin/daphne --config=UserConfig.json ...
In daphne.cpp we setup the configuration object with values from the config.json file (if provided) and then we replace them in case the user provides command line arguments. However for a lot of cases we overwrite the values from the .json file with the default cli values, that have not been actually provided as CLI arguments by the user.
E.g.:
// Initialize user_config object with values from the .json file.
...
...
static opt<QueueTypeOption> queueSetupScheme("queue_layout",
cat(schedulingOptions), desc("Choose queue setup scheme:"),
values(
clEnumVal(CENTRALIZED, "One queue (default)"),
clEnumVal(PERGROUP, "One queue per CPU group"),
clEnumVal(PERCPU, "One queue per CPU core")
),
init(CENTRALIZED)
);
... // Default queueSetupScheme is CENTRALIZED
...
user_config.queueSetupScheme = queueSetupScheme;
We always replace the existing queueSetupScheme which at this point could be a parsed value from the configuration file.
Users can configure daphne either via cli arguments or providing a .json configuration file:
./bin/daphne --config=UserConfig.json ...
In daphne.cpp we setup the configuration object with values from the
config.json
file (if provided) and then we replace them in case the user provides command line arguments. However for a lot of cases we overwrite the values from the.json
file with the default cli values, that have not been actually provided as CLI arguments by the user. E.g.:We always replace the existing queueSetupScheme which at this point could be a parsed value from the configuration file.