https://github.com/bigbinary/pg_connection_counter
https://github.com/bigbinary/pg_connection_counter
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/bigbinary/pg_connection_counter
- Owner: bigbinary
- License: mit
- Created: 2014-12-11T13:15:52.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-16T17:55:01.000Z (about 10 years ago)
- Last Synced: 2025-02-04T21:43:22.868Z (4 months ago)
- Language: Ruby
- Size: 219 KB
- Stars: 0
- Watchers: 48
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE
Awesome Lists containing this project
README
# PgConnectionCounter
Displays the number of connections opened in the database.
#### Usage
```
gem 'pg_connection_counter'
```This gem provides a rake task. The rake task can be run on hourly basis and log the connection status.
```
rake log_pg_connection_counter
```If you want more fine grained control then use like this. In one project we put a `before_action` call to display the connection status using the method described below.
```
PgConnectionCounter::Counter.new.display
```