#include <quantum_configuration.h>
|
static const std::string & | getJsonSchema () |
| Get the JSON schema corresponding to this configuration object. More...
|
|
static const std::string & | getJsonSchemaUri () |
| Get the schema URI used to resolve remote JSON references '$ref'. More...
|
|
◆ BackoffPolicy
Enumerator |
---|
Linear | Linear backoff.
|
Exponential | |
◆ getCoroQueueIdRangeForAny()
const std::pair<int, int>& Bloomberg::quantum::Configuration::getCoroQueueIdRangeForAny |
( |
| ) |
const |
◆ getJsonSchema()
static const std::string& Bloomberg::quantum::Configuration::getJsonSchema |
( |
| ) |
|
|
static |
Get the JSON schema corresponding to this configuration object.
- Returns
- The draft-04 compatible schema.
◆ getJsonSchemaUri()
static const std::string& Bloomberg::quantum::Configuration::getJsonSchemaUri |
( |
| ) |
|
|
static |
Get the schema URI used to resolve remote JSON references '$ref'.
- Returns
- The URI.
◆ getLoadBalancePollIntervalBackoffPolicy()
BackoffPolicy Bloomberg::quantum::Configuration::getLoadBalancePollIntervalBackoffPolicy |
( |
| ) |
const |
Get the backoff policy in load balance mode.
- Returns
- The backoff policy used.
◆ getLoadBalancePollIntervalMs()
std::chrono::milliseconds Bloomberg::quantum::Configuration::getLoadBalancePollIntervalMs |
( |
| ) |
const |
Get load balance shared queue poll interval.
- Returns
- The number of milliseconds.
◆ getLoadBalancePollIntervalNumBackoffs()
size_t Bloomberg::quantum::Configuration::getLoadBalancePollIntervalNumBackoffs |
( |
| ) |
const |
Get the number of backoffs used.
- Returns
- The number of backoffs.
◆ getLoadBalanceSharedIoQueues()
bool Bloomberg::quantum::Configuration::getLoadBalanceSharedIoQueues |
( |
| ) |
const |
Check if IO shared queues are load balanced or not.
- Returns
- True or False.
◆ getNumCoroutineThreads()
int Bloomberg::quantum::Configuration::getNumCoroutineThreads |
( |
| ) |
const |
Get the number of coroutine threads.
- Returns
- The number of threads.
◆ getNumIoThreads()
int Bloomberg::quantum::Configuration::getNumIoThreads |
( |
| ) |
const |
Get the number of IO threads.
- Returns
- The number of threads.
◆ getPinCoroutineThreadsToCores()
bool Bloomberg::quantum::Configuration::getPinCoroutineThreadsToCores |
( |
| ) |
const |
Check to see if coroutine threads are pinned to cores or not.
- Returns
- True or False.
◆ setCoroQueueIdRangeForAny()
void Bloomberg::quantum::Configuration::setCoroQueueIdRangeForAny |
( |
const std::pair< int, int > & |
coroQueueIdRangeForAny | ) |
|
◆ setLoadBalancePollIntervalBackoffPolicy()
void Bloomberg::quantum::Configuration::setLoadBalancePollIntervalBackoffPolicy |
( |
BackoffPolicy |
policy | ) |
|
Set a backoff policy for the shared queue polling interval.
- Parameters
-
[in] | policy | The backoff policy to use. Default is 'Linear'. |
◆ setLoadBalancePollIntervalMs()
void Bloomberg::quantum::Configuration::setLoadBalancePollIntervalMs |
( |
std::chrono::milliseconds |
interval | ) |
|
Set the interval between IO thread polls.
- Parameters
-
[in] | interval | Interval in milliseconds. Default is 100ms. |
- Note
- Setting this to a higher value means it may take longer to react to the first IO task posted, and vice-versa if the interval is lower.
◆ setLoadBalancePollIntervalNumBackoffs()
void Bloomberg::quantum::Configuration::setLoadBalancePollIntervalNumBackoffs |
( |
size_t |
numBackoffs | ) |
|
Set the number of backoffs.
- Parameters
-
[in] | numBackoffs | The number of backoff increments. Default is 0. When the number of backoffs is reached, the poll interval remains unchanged thereafter. |
◆ setLoadBalanceSharedIoQueues()
void Bloomberg::quantum::Configuration::setLoadBalanceSharedIoQueues |
( |
bool |
value | ) |
|
Load balancee the shared IO queues.
- Parameters
-
[in] | value | If set to true, posting to the 'any' IO queue will result in the load being spread among N queues. This mode can provide higher throughput if dealing with high task loads. Default is false. |
- Note
- To achieve higher performance, the threads run in polling mode which increases CPU usage even when idle.
◆ setNumCoroutineThreads()
void Bloomberg::quantum::Configuration::setNumCoroutineThreads |
( |
int |
num | ) |
|
Set the number of threads running coroutines.
- Parameters
-
[in] | num | The number of threads. Set to -1 to have one coroutine thread per core. Default is -1. |
◆ setNumIoThreads()
void Bloomberg::quantum::Configuration::setNumIoThreads |
( |
int |
num | ) |
|
Set the number of threads running IO tasks.
- Parameters
-
[in] | num | The number of threads. Default is 5. |
◆ setPinCoroutineThreadsToCores()
void Bloomberg::quantum::Configuration::setPinCoroutineThreadsToCores |
( |
bool |
value | ) |
|
Indicate if coroutine threads should be pinned to a core.
- Parameters
-
[in] | value | True or False. Default is False. |
- Note
- For best performance, the number of coroutine threads should be <= the number of cores in the system.