Project

langda

0.0
No release in over 3 years
Langda monitors Ruby loop operations (each, map, select, etc.), counts their iterations, measures execution time, and logs slow loops. It helps developers quickly identify performance bottlenecks in real application code with zero configuration and no breaking changes.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 0
 Project Readme

Langda • Preferred Development Environment

Langda is a lightweight Ruby performance helper that automatically detects loops, counts their iterations, measures execution time, and logs slow loops — all without changing your application code.

It is designed for Rails and Ruby developers who want instant visibility into slow loops such as each, map, select, reject, etc.


✨ Features

  • 🟢 Auto-detects common Ruby loop methods
  • 🔢 Counts loop iterations
  • ⏱ Measures execution time using high-precision monotonic clock
  • ⚠ Logs loops that cross the configurable slow threshold
  • 🛡 Safe fallback — never crashes your app
  • 🚀 Works in Rails, plain Ruby, Sidekiq, and background jobs
  • 🔌 Zero configuration — install and use instantly


✨ Examples

  • [Langda] Array#each → 42 iterations → 12.37 ms at app/models/user.rb:25
  • [Langda] Hash#map → 8 iterations → 6.19 ms at app/services/report_builder.rb:12

📦 Installation

Add this line to your Gemfile:

gem "langda"