0.0
The project is in a healthy, maintained state
Track render budgets, profile partial performance, detect N+1 queries in views, and measure helper method costs for Ruby web applications.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

Render Guardian

Render conservation guardian — template budgets, partial profiling, N+1 query detection, and helper method cost tracking for Ruby web applications.

Installation

gem install render-guardian

Usage

require "render_guardian"

# Analyze render events
report = RenderGuardian.analyze(
  render_log: [
    { template: "index", partial: "_row", duration_ms: 200,
      db_queries: ["SELECT * FROM items WHERE id=1"],
      helpers_called: [{ name: "format_price", time_ms: 5 }] },
    # ... more events
  ]
)

puts report
puts report.summary

Features

  • Render Budget — max time per template/partial
  • Partial Profiling — stats by template and partial
  • N+1 Detection — repeated queries and high query-per-partial ratios
  • Helper Cost Tracking — find slow helper methods
  • Conservation Reports — human and machine-readable

License

MIT