Socket
Book a DemoInstallSign in
Socket

profit

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

profit

0.1.7
bundlerRubygems
Version published
Maintainers
1
Created
Source

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!

FAQs

Package last updated on 18 Jul 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.