quill
Static Public Attributes | List of all members
FrontendOptions Struct Reference

Adding a benchmark for a another logger should be straight forward by duplicating and modifying this file. More...

#include <FrontendOptions.h>

Inheritance diagram for FrontendOptions:
Inheritance graph
[legend]
Collaboration diagram for FrontendOptions:
Collaboration graph
[legend]

Static Public Attributes

static constexpr QueueType queue_type = QueueType::UnboundedBlocking
 Each frontend thread has its own queue, which can be configured with various options: More...
 
static constexpr size_t initial_queue_capacity = 128u * 1024u
 Initial capacity of the queue.
 
static constexpr uint32_t blocking_queue_retry_interval_ns = 800
 Interval for retrying when using BoundedBlocking or UnboundedBlocking. More...
 
static constexpr size_t unbounded_queue_max_capacity = 2ull * 1024u * 1024u * 1024u
 Maximum capacity for unbounded queues (UnboundedBlocking, UnboundedDropping). More...
 
static constexpr HugePagesPolicy huge_pages_policy = HugePagesPolicy::Never
 Enables huge pages on the frontend queues to reduce TLB misses. More...
 

Detailed Description

Adding a benchmark for a another logger should be straight forward by duplicating and modifying this file.

Frontend options are expressed as a traits type.

To override only a subset of options, derive from FrontendOptions and redeclare only the members that change. New members added to FrontendOptions will then be inherited automatically unless the derived type explicitly overrides them.

Note
FrontendOptions are intended to be an application-wide choice. Mixing different FrontendImpl<TFrontendOptions> or LoggerImpl<TFrontendOptions> specializations is not a supported configuration. Use one frontend specialization consistently throughout the application.
{
static constexpr QueueType queue_type = QueueType::BoundedDropping;
static constexpr size_t initial_queue_capacity = 256u * 1024u;
};

Member Data Documentation

◆ blocking_queue_retry_interval_ns

constexpr uint32_t FrontendOptions::blocking_queue_retry_interval_ns = 800
static

Interval for retrying when using BoundedBlocking or UnboundedBlocking.

Applicable only when using BoundedBlocking or UnboundedBlocking.

◆ huge_pages_policy

constexpr HugePagesPolicy FrontendOptions::huge_pages_policy = HugePagesPolicy::Never
static

Enables huge pages on the frontend queues to reduce TLB misses.

Available only for Linux.

◆ queue_type

constexpr QueueType FrontendOptions::queue_type = QueueType::UnboundedBlocking
static

Each frontend thread has its own queue, which can be configured with various options:

  • UnboundedBlocking: Starts with initial_queue_capacity and reallocates up to unbounded_queue_max_capacity, then blocks.
  • UnboundedDropping: Starts with initial_queue_capacity and reallocates up to unbounded_queue_max_capacity, then drops log messages.
  • BoundedBlocking: Starts with initial_queue_capacity and never reallocates; blocks when the limit is reached. A single message larger than the fixed queue capacity cannot fit and fails instead of blocking forever.
  • BoundedDropping: Starts with initial_queue_capacity and never reallocates; drops log messages when the limit is reached.

By default, the library uses an UnboundedBlocking queue, which starts with initial_queue_capacity.

◆ unbounded_queue_max_capacity

constexpr size_t FrontendOptions::unbounded_queue_max_capacity = 2ull * 1024u * 1024u * 1024u
static

Maximum capacity for unbounded queues (UnboundedBlocking, UnboundedDropping).

This defines the maximum size to which the queue can grow before blocking or dropping messages.


The documentation for this struct was generated from the following files: