Sha256: fa8a9a97e19ca45700e5d74b63ba7b74bdb0b2513eba06ef02007b624bb1f08c

Contents?: true

Size: 968 Bytes

Versions: 1

Compression:

Stored size: 968 Bytes

Contents

# Puma::Clocker

A super-basic gem to calculate the speed of your Rails project's `rails server` command.


## Installation

Add the following to your Rails project's Gemfile:

```ruby
gem 'puma-clocker'
```

Bundle it!


## Usage

Time-calculations are done based on the exact time you executed the command. For this, the system's `date` command is used. Its output is passed to `rails s` as an environment variable, like so:

    STARTING_PUMA_ON=$(date) rails s

or as an abbreviated variable, like so:

    SPO=$(date) rails s

The time-calculation result will appear in the last line shown right after Puma's own messages:

![alt text](https://github.com/humzashah/puma-clocker/blob/master/output.png "Passed seconds appear in last line")

If you are loading other environment variables from a `.env` file, you might be tempted to do the same for `SPO`. However, keep in mind that the start-time considered then will not be the true starting time of the command.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
puma-clocker-0.1.0 README.md