@@ -50,29 +50,29 @@ func NewConfig(
5050//
5151// - LineBuffer (bufferSize <= 65536), which is a single string buffer, protected by a mutex, that offers
5252// write performance up to ~1M lines/sec (spectatord maximum), with a latency per write ranging from
53- // 0.1-15 us, depending upon the number of threads in use.
53+ // 0.1 to 32 us, depending upon the number of threads in use.
5454//
55- // Metrics are flushed from the buffer when an overflow occurs, and periodically by a goroutine , according to
56- // the flush interval. Thus, if there are periods of time when metric publishing is slow, metrics will still be
57- // delivered from the buffer on time. Note that the spectatord publish interval is every 5 seconds, which is a
58- // good choice for this configuration. This buffer will block, and it will not drop lines.
55+ // Metrics are flushed from the buffer when an overflow occurs, and periodically by a timer , according to the
56+ // flush interval. Thus, if there are periods of time when metric publishing is slow, metrics will still be
57+ // delivered from the buffer on time. Note that the spectatord publish interval is every 5 seconds, which is
58+ // a good choice for this configuration. This buffer will block, and it will not drop lines.
5959//
60- // The LineBuffer reports two metrics, which can be used to monitor buffer performance:
60+ // The LineBuffer reports metrics, which can be used to monitor buffer performance:
6161//
6262// - spectator-go.lineBuffer.bytesWritten - A counter reporting bytes/sec written to spectatord.
63- // - spectator-go.lineBuffer.overflows - A counter reporting overflows/sec, which are flushes before interval.
63+ // - spectator-go.lineBuffer.overflows - A counter reporting overflows/sec, which are flushes before the interval.
6464//
6565// Example configuration:
6666//
6767// config, _ := NewConfigWithBuffer("udp", nil, nil, 61440, 5*time.Second)
6868//
6969// - LowLatencyBuffer (bufferSize > 65536), which builds arrays of buffers that are optimized for introducing
7070// the least amount of latency in highly multithreaded applications that record many metrics. It offers write
71- // performance up to ~1 M lines/sec (spectatord maximum), with a latency per write ranging from 0.6-3 us,
71+ // performance up to ~1 M lines/sec (spectatord maximum), with a latency per write ranging from 0.6 to 7 us,
7272// depending upon the number of threads in use.
7373//
7474// This is achieved by spreading data access across a number of different mutexes, and only writing buffers from
75- // a goroutine that runs periodically, according to the flushInterval . There is a front buffer and a back buffer,
75+ // a goroutine that runs periodically, according to the flush interval . There is a front buffer and a back buffer,
7676// and these are rotated during the periodic flush. The inactive buffer is flushed, while the active buffer
7777// continues to receive metric writes from the application. Within each buffer, there are numCPU shards, and each
7878// buffer shard has N chunks, where a chunk is set to 60KB, to allow the data to fit within the spectatord socket
@@ -92,14 +92,14 @@ func NewConfig(
9292// that there is always at least 1 chunk per shard. On a system with 1 CPU, this will be 122,880 bytes, and on a
9393// system with 4 CPU, this will be 491,520 bytes.
9494//
95- // The LowLatencyBuffer reports two metrics, which can be used to monitor buffer performance:
95+ // The LowLatencyBuffer reports metrics, which can be used to monitor buffer performance:
9696//
9797// - spectator-go.lowLatencyBuffer.bytesWritten - A counter reporting bytes/sec written to spectatord.
9898// - spectator-go.lowLatencyBuffer.overflows - A counter reporting overflows/sec, which are drops.
9999// - spectator-go.lowLatencyBuffer.pctUsage - A gauge reporting the percent usage of the buffers.
100100//
101101// When using the LowLatencyBuffer, it is recommended to watch the spectatord.parsedCount metric, to ensure that
102- // you have sufficient headroom against the maximum data ingestion rate of ~1 M lines/sec for spectatord.
102+ // you have sufficient headroom against the maximum data ingestion rate of ~1M lines/sec for spectatord.
103103//
104104// Example configuration:
105105//
0 commit comments