Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

arlequin

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arlequin

  • 0.1.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Arlequin

Arlequin is a Ruby gem that helps detect and warn about N+1 SQL queries in Rails applications. It includes middleware that integrates seamlessly with your Rails application to improve performance by identifying inefficient database queries.

Features

  • N+1 Query Detection: Automatically detects and warns about N+1 query problems.
  • Integration: Easy integration with Rails applications through a Railtie.
  • Performance Insights: Provides detailed insights into query performance issues.

Installation

Add this line to your application's Gemfile:

gem 'arlequin', group: [ :development ]

Then execute:

$ bundle install

Usage

Basic Setup

To start using Arlequin, simply add the following to your Rails application’s configuration file (config/application.rb):

require 'arlequin'

Middleware

Arlequin integrates with Rails as middleware. It will automatically start monitoring SQL queries for N+1 problems. No additional setup is required beyond including it in your Gemfile and configuration.

Example

Suppose you have a Rails application with a Post model that has many Comments. If you inadvertently write code like:

@posts = Post.all
@posts.each do |post|
  puts post.comments.count
end

Arlequin will detect this N+1 query issue and warn you about it in the UI.

Development

To contribute to Arlequin, clone the repository and run the test suite:

git clone https://github.com/dominicgoulet/arlequin.git
cd arlequin
bundle install
rake test

Make sure to write tests for any new features or bug fixes you add. Follow the existing coding style and conventions used in the project.

Contributing

We welcome contributions! Please submit pull requests and issues through GitHub. Ensure your code adheres to the project’s style and includes appropriate tests.

License

Arlequin is released under the MIT License.

Contact

For any questions or feedback, feel free to reach out to us at [dominic@dominicgoulet.com].

FAQs

Package last updated on 25 Jul 2024

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc