From 4cfe589bfd83611acd964023d870247ba8b881b8 Mon Sep 17 00:00:00 2001 From: Devin Nusbaum Date: Mon, 21 Oct 2024 13:05:12 -0400 Subject: [PATCH] Reduce default size of diagnostic buffer for `FlightRecorderInputStream` from 1MiB to 1KiB (#770) * Reduce default size of diagnostic buffer for FlightRecorderInputStream from 1MiB to 1KiB * Restore `final` modifier for BUFFER_SIZE * Spotless --- src/main/java/hudson/remoting/FlightRecorderInputStream.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/hudson/remoting/FlightRecorderInputStream.java b/src/main/java/hudson/remoting/FlightRecorderInputStream.java index 9e2dcaa3f..b724d7873 100644 --- a/src/main/java/hudson/remoting/FlightRecorderInputStream.java +++ b/src/main/java/hudson/remoting/FlightRecorderInputStream.java @@ -22,8 +22,7 @@ class FlightRecorderInputStream extends InputStream { * Size (in bytes) of the flight recorder ring buffer used for debugging remoting issues. * @since 2.41 */ - static final int BUFFER_SIZE = - Integer.getInteger("hudson.remoting.FlightRecorderInputStream.BUFFER_SIZE", 1024 * 1024); + static final int BUFFER_SIZE = Integer.getInteger("hudson.remoting.FlightRecorderInputStream.BUFFER_SIZE", 1024); private final InputStream source; private ByteArrayRingBuffer recorder = new ByteArrayRingBuffer(BUFFER_SIZE);