From e18a5b2384d57dab5422892985f05f0fea42f81f Mon Sep 17 00:00:00 2001 From: Oleh Gerus <73129739+olehgerus@users.noreply.github.com> Date: Wed, 14 Oct 2026 12:25:05 +0300 Subject: [PATCH] Write the large integers in tools/measure_body.exs with digit separators 65536 and 16384 were the only integers over 9999 in the file without underscores; the same list already writes 262_144 and 1_048_576. The values do not change. Closes #76. Before, `mix credo --strict tools/measure_body.exs`: [R] Numbers larger than 9999 should be written with underscores: 65_536 tools/measure_body.exs:90:34 [R] Numbers larger than 9999 should be written with underscores: 16_384 tools/measure_body.exs:90:27 [R] Numbers larger than 9999 should be written with underscores: 65_536 tools/measure_body.exs:44:27 3 mods/funs, found 3 code readability issues. After: "3 mods/funs, found no issues." `mix format --check-formatted tools/measure_body.exs` passes. Signed-off-by: Oleh Gerus <73129739+olehgerus@users.noreply.github.com> --- tools/measure_body.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/measure_body.exs b/tools/measure_body.exs index 8bbef6c..88f2402 100644 --- a/tools/measure_body.exs +++ b/tools/measure_body.exs @@ -41,7 +41,7 @@ Process.register(self(), :collector) Process.sleep(300) declared = 32 * 1024 * 1024 -chunk = :binary.copy("x", 65536) +chunk = :binary.copy("x", 65_536) measure = fn sndbuf -> opts = [:binary, active: false, packet: :raw] ++ if sndbuf, do: [sndbuf: sndbuf], else: [] @@ -87,7 +87,7 @@ IO.puts( String.pad_trailing("B: client wrote", 20) <> "A: server read before refusing" ) -for sndbuf <- [nil, 4096, 16384, 65536, 262_144, 1_048_576] do +for sndbuf <- [nil, 4096, 16_384, 65_536, 262_144, 1_048_576] do {s, written, server_read} = measure.(sndbuf) label = if s, do: Integer.to_string(s), else: "default"