Skip to content

Commit

Permalink
Reduce default size of diagnostic buffer for `FlightRecorderInputStre…
Browse files Browse the repository at this point in the history
…am` from 1MiB to 1KiB (#770)

* Reduce default size of diagnostic buffer for FlightRecorderInputStream from 1MiB to 1KiB

* Restore `final` modifier for BUFFER_SIZE

* Spotless
  • Loading branch information
dwnusbaum authored Oct 21, 2024
1 parent e1ea5d6 commit 4cfe589
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/hudson/remoting/FlightRecorderInputStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4cfe589

Please sign in to comment.