Skip to content

Conversation

@solnic
Copy link
Collaborator

@solnic solnic commented Jun 6, 2025

Current status

Git SHA      Branch     Iter     Allocated    Retained     Alloc Mem    Ret Mem     
------------------------------------------------------------------------------------------
213558f3     master     100,000  9,681,713    1,395,346    921.32 MB    217.9 MB    
cafd4cdc     2641-incre 100,000  2,920,177    1,598,060    445.48 MB    285.83 MB   

=== Performance Trends ===

Comparing latest (cafd4cdc) vs baseline (213558f3):

Object Allocation: 📉 -69.84% (decrease)
Object Retention: 📈 +14.53% (increase)
Memory Usage: 📉 -51.65% (decrease)

Memory per iteration:
  Baseline: 9.43 KB
  Latest:   4.56 KB
  Change:   📉 -51.65% (decrease)

=== Recent Commits ===

213558f3 (2025-06-09 12:15)
  [sentry-ruby] fix and improve spec suite setup (#2640)
  Memory: 921.32 MB allocated, 217.9 MB retained

cafd4cdc (2025-06-09 12:15)
  Update CHANGELOG
  Memory: 445.48 MB allocated, 285.83 MB retained

Closes #2641

@solnic solnic linked an issue Jun 6, 2025 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jun 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.70%. Comparing base (213558f) to head (cafd4cd).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2643      +/-   ##
==========================================
+ Coverage   93.68%   96.70%   +3.01%     
==========================================
  Files         133      133              
  Lines        5101     5131      +30     
==========================================
+ Hits         4779     4962     +183     
+ Misses        322      169     -153     
Components Coverage Δ
sentry-ruby 97.45% <100.00%> (+4.09%) ⬆️
sentry-rails 92.63% <ø> (-0.79%) ⬇️
sentry-sidekiq 96.19% <ø> (+0.76%) ⬆️
sentry-resque 94.44% <ø> (ø)
sentry-delayed_job 94.68% <ø> (ø)
sentry-opentelemetry 98.62% <ø> (-0.69%) ⬇️
Files with missing lines Coverage Δ
sentry-ruby/lib/sentry/client.rb 99.40% <100.00%> (ø)
sentry-ruby/lib/sentry/log_event.rb 100.00% <100.00%> (ø)
sentry-ruby/lib/sentry/scope.rb 99.38% <100.00%> (+0.63%) ⬆️

... and 34 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@solnic solnic force-pushed the 2641-increase-memory-usage-in-logging branch from 09006fa to ecfe433 Compare June 9, 2025 12:00
@solnic solnic marked this pull request as ready for review June 9, 2025 12:08
@solnic solnic requested a review from sl0thentr0py June 9, 2025 12:11
@solnic solnic merged commit e126f72 into master Jun 10, 2025
143 checks passed
@solnic solnic deleted the 2641-increase-memory-usage-in-logging branch June 10, 2025 13:36
{ value: value, type: value_type(value) }
end

VALUE_TYPES = Hash.new("string").merge!({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotta be careful when using the default value

$ irb
irb(main):001> a = Hash.new("string")
=> {}
irb(main):002> a["foo"]
=> "string"
irb(main):003> a["bar"] << "bar"
=> "stringbar"
irb(main):004> a["foo"]
=> "stringbar"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@solnic 🙏

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dentarg @sl0thentr0py I believe we're good since there's frozen string literals magic comment at the top of this file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Increase Memory usage in Logging

4 participants