
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Tick benchmark your method and print it in color
gem install tick
include Tick
class Foo
include Tick
end
Tick your method define method
def foo
end
tick :foo
Sample output without color
TICK: method 'foo' in class 'Foo' (0.1 s)
Customize message for each method
tick :foo, :message => "benchmark for foo"
tick :foo, :message => lambda {|class_name, method_name| " #{class_name}-#{method_name}"}
By default you don't need any configuration.
Enable tick:
Tick.enabled = true
default: true
Whether print benchmark in color
Tick.color = true
default: true
Logger:
Tick.logger = Logger.new(STDOUT)
default: Rails.logger if in Rails environment otherwise Logger.new(STDOUT)
Customize messages:
Tick.desc_message = lambda { |class_name, method_name| "TIME c:#{class_name} m:#{method_name}" }
Tick.time_message = lambda { |sec| "COST (#{sec})" }
Default:
Set 256 color:
Tick.desc_color = "#FFC482"
Tick.time_color = "#FFC482"
Default:
FAQs
Unknown package
We found that tick demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.