Skip to content

Commit ff683fe

Browse files
committed
Fix a leak in Lobsters benchmark
Profiling the lobsters benchmark I'm seeing a fairly large time spent joining tags in TaggedLogger. That intruigued me, and by digging I noticed the requests UUIDs kept being appended but never removed. So for every single request we have one more tag, this is skewing the benchmark a bit, as we spend much more time than we should in logging.
1 parent 133a6c9 commit ff683fe

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

benchmarks/lobsters/benchmark.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
puts response_array.inspect
4848
raise "HTTP status is #{response_array.first} instead of 200 for req #{idx}/#{generator.routes.size}, #{path.inspect}. Is the benchmark app properly set up? See README.md."
4949
end
50+
response_array.last.close # Response might be a Rack::BodyProxy and MUST be closed.
5051
end
5152
end
5253

0 commit comments

Comments
 (0)