Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use perf-tools for allocations/fiber tracking #733

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

carlhoerberg
Copy link
Member

WHAT is this pull request doing?

Uses https://github.com/crystal-lang/perf-tools to get various allocations and fiber reports

HOW can this pull request be tested?

pkill -USR1 lavinmq

@carlhoerberg carlhoerberg changed the title Use perf-tools for allocations/fiber tracking, USR1 to report Use perf-tools for allocations/fiber tracking Jul 17, 2024
@carlhoerberg carlhoerberg marked this pull request as ready for review February 18, 2025 10:46
@carlhoerberg carlhoerberg requested a review from a team as a code owner February 18, 2025 10:46
LavinMQ::Reporter.report(@amqp_server)
# puts "Fibers:"
# Fiber.list { |f| puts f.inspect }
# LavinMQ::Reporter.report(@amqp_server)
Copy link
Member

Choose a reason for hiding this comment

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

I think this is good to log as well

puts "Allocations:"
PerfTools::MemProf.log_allocations(STDOUT)
puts "Fibers:"
PerfTools::FiberTrace.log_fibers(STDOUT)
Copy link
Member

Choose a reason for hiding this comment

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

Output from log_fibers

4
/usr/lib/crystal/crystal/system/unix/signal.cr:99:7 in 'process'
/usr/lib/crystal/crystal/system/unix/signal.cr:87:9 in '->'
/usr/lib/crystal/fiber.cr:148:11 in 'run'
/usr/lib/crystal/fiber.cr:100:34 in '->'

....

what does it mean and is it worth to have in the output?

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.

2 participants