@@ -61,13 +61,13 @@ public class StatsCollector {
61
61
" | CPU {}% | Mem {} MiB heap / {} MiB direct" +
62
62
" | Prod rate {} msg/s / {} MiB/s | Prod err {} err/s" +
63
63
" | Cons rate {} msg/s / {} MiB/s | Backlog: {} K msg" +
64
- " | Prod Latency (ms) avg: {} - 50%: {} - 99%: {} - 99.9%: {} - Max : {}" +
65
- " | E2E Latency (ms) avg: {} - 50%: {} - 99%: {} - 99.9%: {} - Max : {}" ;
64
+ " | Prod Latency (ms) avg: {} - min: {} - 50%: {} - 99%: {} - 99.9%: {} - max : {}" +
65
+ " | E2E Latency (ms) avg: {} - min: {} - 50%: {} - 99%: {} - 99.9%: {} - max : {}" ;
66
66
private static final String SUMMARY_LOG_FORMAT = "Summary" +
67
67
" | Prod rate {} msg/s / {} MiB/s | Prod total {} M msg / {} GiB / {} K err" +
68
68
" | Cons rate {} msg/s / {} MiB/s | Cons total {} M msg / {} GiB" +
69
- " | Prod Latency (ms) avg: {} - 50%: {} - 75%: {} - 90%: {} - 95%: {} - 99%: {} - 99.9%: {} - 99.99%: {} - Max : {}" +
70
- " | E2E Latency (ms) avg: {} - 50%: {} - 75%: {} - 90%: {} - 95%: {} - 99%: {} - 99.9%: {} - 99.99%: {} - Max : {}" ;
69
+ " | Prod Latency (ms) avg: {} - min: {} - 50%: {} - 75%: {} - 90%: {} - 95%: {} - 99%: {} - 99.9%: {} - 99.99%: {} - max : {}" +
70
+ " | E2E Latency (ms) avg: {} - min: {} - 50%: {} - 75%: {} - 90%: {} - 95%: {} - 99%: {} - 99.9%: {} - 99.99%: {} - max : {}" ;
71
71
72
72
private static final Logger LOGGER = LoggerFactory .getLogger (StatsCollector .class );
73
73
@@ -159,6 +159,7 @@ public static class Result {
159
159
public final List <Double > consumeThroughputBps = new ArrayList <>();
160
160
public final List <Long > backlog = new ArrayList <>();
161
161
public final List <Double > produceLatencyMeanMicros = new ArrayList <>();
162
+ public final List <Double > produceLatencyMinMicros = new ArrayList <>();
162
163
public final List <Double > produceLatency50thMicros = new ArrayList <>();
163
164
public final List <Double > produceLatency75thMicros = new ArrayList <>();
164
165
public final List <Double > produceLatency90thMicros = new ArrayList <>();
@@ -169,6 +170,7 @@ public static class Result {
169
170
public final List <Double > produceLatencyMaxMicros = new ArrayList <>();
170
171
public Map <Double , Long > produceLatencyQuantilesMicros ;
171
172
public final List <Double > endToEndLatencyMeanMicros = new ArrayList <>();
173
+ public final List <Double > endToEndLatencyMinMicros = new ArrayList <>();
172
174
public final List <Double > endToEndLatency50thMicros = new ArrayList <>();
173
175
public final List <Double > endToEndLatency75thMicros = new ArrayList <>();
174
176
public final List <Double > endToEndLatency90thMicros = new ArrayList <>();
@@ -193,6 +195,7 @@ private void update(PeriodResult periodResult, double elapsedTotal) {
193
195
this .consumeThroughputBps .add (periodResult .consumeThroughputBps );
194
196
this .backlog .add (periodResult .backlog );
195
197
this .produceLatencyMeanMicros .add (periodResult .produceLatencyMeanMicros );
198
+ this .produceLatencyMinMicros .add (periodResult .produceLatencyMinMicros );
196
199
this .produceLatency50thMicros .add (periodResult .produceLatency50thMicros );
197
200
this .produceLatency75thMicros .add (periodResult .produceLatency75thMicros );
198
201
this .produceLatency90thMicros .add (periodResult .produceLatency90thMicros );
@@ -202,6 +205,7 @@ private void update(PeriodResult periodResult, double elapsedTotal) {
202
205
this .produceLatency9999thMicros .add (periodResult .produceLatency9999thMicros );
203
206
this .produceLatencyMaxMicros .add (periodResult .produceLatencyMaxMicros );
204
207
this .endToEndLatencyMeanMicros .add (periodResult .endToEndLatencyMeanMicros );
208
+ this .endToEndLatencyMinMicros .add (periodResult .endToEndLatencyMinMicros );
205
209
this .endToEndLatency50thMicros .add (periodResult .endToEndLatency50thMicros );
206
210
this .endToEndLatency75thMicros .add (periodResult .endToEndLatency75thMicros );
207
211
this .endToEndLatency90thMicros .add (periodResult .endToEndLatency90thMicros );
@@ -256,6 +260,7 @@ private static class PeriodResult {
256
260
private final double consumeThroughputBps ;
257
261
private final long backlog ;
258
262
private final double produceLatencyMeanMicros ;
263
+ private final double produceLatencyMinMicros ;
259
264
private final double produceLatency50thMicros ;
260
265
private final double produceLatency75thMicros ;
261
266
private final double produceLatency90thMicros ;
@@ -265,6 +270,7 @@ private static class PeriodResult {
265
270
private final double produceLatency9999thMicros ;
266
271
private final double produceLatencyMaxMicros ;
267
272
private final double endToEndLatencyMeanMicros ;
273
+ private final double endToEndLatencyMinMicros ;
268
274
private final double endToEndLatency50thMicros ;
269
275
private final double endToEndLatency75thMicros ;
270
276
private final double endToEndLatency90thMicros ;
@@ -285,6 +291,7 @@ private PeriodResult(CpuMonitor cpu, PeriodStats stats, double elapsed, int read
285
291
this .consumeThroughputBps = stats .bytesReceived / elapsed ;
286
292
this .backlog = Math .max (0 , readWriteRatio * stats .totalMessagesSent - stats .totalMessagesReceived );
287
293
this .produceLatencyMeanMicros = stats .sendLatencyMicros .getMean ();
294
+ this .produceLatencyMinMicros = stats .sendLatencyMicros .getMinValue ();
288
295
this .produceLatency50thMicros = stats .sendLatencyMicros .getValueAtPercentile (50 );
289
296
this .produceLatency75thMicros = stats .sendLatencyMicros .getValueAtPercentile (75 );
290
297
this .produceLatency90thMicros = stats .sendLatencyMicros .getValueAtPercentile (90 );
@@ -294,6 +301,7 @@ private PeriodResult(CpuMonitor cpu, PeriodStats stats, double elapsed, int read
294
301
this .produceLatency9999thMicros = stats .sendLatencyMicros .getValueAtPercentile (99.99 );
295
302
this .produceLatencyMaxMicros = stats .sendLatencyMicros .getMaxValue ();
296
303
this .endToEndLatencyMeanMicros = stats .endToEndLatencyMicros .getMean ();
304
+ this .endToEndLatencyMinMicros = stats .endToEndLatencyMicros .getMinValue ();
297
305
this .endToEndLatency50thMicros = stats .endToEndLatencyMicros .getValueAtPercentile (50 );
298
306
this .endToEndLatency75thMicros = stats .endToEndLatencyMicros .getValueAtPercentile (75 );
299
307
this .endToEndLatency90thMicros = stats .endToEndLatencyMicros .getValueAtPercentile (90 );
@@ -317,11 +325,13 @@ private void logIt(double elapsedTotal) {
317
325
THROUGHPUT_FORMAT .format (consumeThroughputBps / BYTES_PER_MB ),
318
326
COUNT_FORMAT .format (backlog / 1_000.0 ),
319
327
LATENCY_FORMAT .format (produceLatencyMeanMicros / MICROS_PER_MILLI ),
328
+ LATENCY_FORMAT .format (produceLatencyMinMicros / MICROS_PER_MILLI ),
320
329
LATENCY_FORMAT .format (produceLatency50thMicros / MICROS_PER_MILLI ),
321
330
LATENCY_FORMAT .format (produceLatency99thMicros / MICROS_PER_MILLI ),
322
331
LATENCY_FORMAT .format (produceLatency999thMicros / MICROS_PER_MILLI ),
323
332
LATENCY_FORMAT .format (produceLatencyMaxMicros / MICROS_PER_MILLI ),
324
333
LATENCY_FORMAT .format (endToEndLatencyMeanMicros / MICROS_PER_MILLI ),
334
+ LATENCY_FORMAT .format (endToEndLatencyMinMicros / MICROS_PER_MILLI ),
325
335
LATENCY_FORMAT .format (endToEndLatency50thMicros / MICROS_PER_MILLI ),
326
336
LATENCY_FORMAT .format (endToEndLatency99thMicros / MICROS_PER_MILLI ),
327
337
LATENCY_FORMAT .format (endToEndLatency999thMicros / MICROS_PER_MILLI ),
@@ -341,6 +351,7 @@ private static class CumulativeResult {
341
351
private final double consumeCountTotal ;
342
352
private final double consumeSizeTotalBytes ;
343
353
private final double produceLatencyMeanTotalMicros ;
354
+ private final double produceLatencyMinTotalMicros ;
344
355
private final double produceLatency50thTotalMicros ;
345
356
private final double produceLatency75thTotalMicros ;
346
357
private final double produceLatency90thTotalMicros ;
@@ -351,6 +362,7 @@ private static class CumulativeResult {
351
362
private final double produceLatencyMaxTotalMicros ;
352
363
public final Map <Double , Long > produceLatencyQuantilesMicros = new TreeMap <>();
353
364
private final double endToEndLatencyMeanTotalMicros ;
365
+ private final double endToEndLatencyMinTotalMicros ;
354
366
private final double endToEndLatency50thTotalMicros ;
355
367
private final double endToEndLatency75thTotalMicros ;
356
368
private final double endToEndLatency90thTotalMicros ;
@@ -372,6 +384,7 @@ private CumulativeResult(CumulativeStats stats, double elapsedTotal) {
372
384
consumeCountTotal = stats .totalMessagesReceived ;
373
385
consumeSizeTotalBytes = stats .totalBytesReceived ;
374
386
produceLatencyMeanTotalMicros = stats .totalSendLatencyMicros .getMean ();
387
+ produceLatencyMinTotalMicros = stats .totalSendLatencyMicros .getMinValue ();
375
388
produceLatency50thTotalMicros = stats .totalSendLatencyMicros .getValueAtPercentile (50 );
376
389
produceLatency75thTotalMicros = stats .totalSendLatencyMicros .getValueAtPercentile (75 );
377
390
produceLatency90thTotalMicros = stats .totalSendLatencyMicros .getValueAtPercentile (90 );
@@ -384,6 +397,7 @@ private CumulativeResult(CumulativeStats stats, double elapsedTotal) {
384
397
value -> produceLatencyQuantilesMicros .put (value .getPercentile (), value .getValueIteratedTo ())
385
398
);
386
399
endToEndLatencyMeanTotalMicros = stats .totalEndToEndLatencyMicros .getMean ();
400
+ endToEndLatencyMinTotalMicros = stats .totalEndToEndLatencyMicros .getMinValue ();
387
401
endToEndLatency50thTotalMicros = stats .totalEndToEndLatencyMicros .getValueAtPercentile (50 );
388
402
endToEndLatency75thTotalMicros = stats .totalEndToEndLatencyMicros .getValueAtPercentile (75 );
389
403
endToEndLatency90thTotalMicros = stats .totalEndToEndLatencyMicros .getValueAtPercentile (90 );
@@ -409,6 +423,7 @@ private void logIt() {
409
423
COUNT_FORMAT .format (consumeCountTotal / 1_000_000.0 ),
410
424
COUNT_FORMAT .format (consumeSizeTotalBytes / BYTES_PER_GB ),
411
425
LATENCY_FORMAT .format (produceLatencyMeanTotalMicros / MICROS_PER_MILLI ),
426
+ LATENCY_FORMAT .format (produceLatencyMinTotalMicros / MICROS_PER_MILLI ),
412
427
LATENCY_FORMAT .format (produceLatency50thTotalMicros / MICROS_PER_MILLI ),
413
428
LATENCY_FORMAT .format (produceLatency75thTotalMicros / MICROS_PER_MILLI ),
414
429
LATENCY_FORMAT .format (produceLatency90thTotalMicros / MICROS_PER_MILLI ),
@@ -418,6 +433,7 @@ private void logIt() {
418
433
LATENCY_FORMAT .format (produceLatency9999thTotalMicros / MICROS_PER_MILLI ),
419
434
LATENCY_FORMAT .format (produceLatencyMaxTotalMicros / MICROS_PER_MILLI ),
420
435
LATENCY_FORMAT .format (endToEndLatencyMeanTotalMicros / MICROS_PER_MILLI ),
436
+ LATENCY_FORMAT .format (endToEndLatencyMinTotalMicros / MICROS_PER_MILLI ),
421
437
LATENCY_FORMAT .format (endToEndLatency50thTotalMicros / MICROS_PER_MILLI ),
422
438
LATENCY_FORMAT .format (endToEndLatency75thTotalMicros / MICROS_PER_MILLI ),
423
439
LATENCY_FORMAT .format (endToEndLatency90thTotalMicros / MICROS_PER_MILLI ),
0 commit comments