Project

profit

0.0
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
This is a client/server combination that allows you to profile code and send the results to a remote Redis server.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

active_support
>= 0
>= 0
 Project Readme

Profit (Profile It)

Step 3

Profit is a client/server pair that lets you record timing data for your code.

Here's the client

# my_ruby_app.rb
client = Profit.client
client.start("some_suspect_code")
some_thing_is_not_right
client.stop("some_suspect_code")

Here's the server

$ profit_server --redis-address 127.0.0.1:6379 \
                --zmq-address tcp://*:5556 \
                --pool-size 10

And if you looked in Redis

irb(main):001:0>Redis.new(host: "127.0.0.1", port: 6379).lrange("some_foo_measurement", 0, -1)
=> ["{\"recorded_time\":1.001161,\"start_file\":\"/Users/me/dev/my_ruby_app.rb\",\"start_line\":27,\"stop_file\":\"/Users/me/dev/my_ruby_app.rb\",\"stop_line\":27}"]

With this, you could track the data over time, see how some optimizations change the performance at runtime, make pretty graphs, you name it!