rails--rails/railties
Sebastian Sogamoso 0547b1646d
Add Server Timing middleware (#36289)
* Add Server Timing middleware

What is server timing?
It's a specification that defines how the server can communicate the
user-agent performance metrics about the request it is responding to.

Here's the official specification:
https://www.w3.org/TR/server-timing/#dfn-server-timing-header-field

How does it work?
This introduces a new `ServerTiming` middleware only on `development` by
default, this is done using the `config.server_timing` setting.

It works by subscribing to all `ActiveSupport::Notifications` and adding
their duration to the `Server-Timing` header.

Why is this useful?
It makes looking at performance metrics in development much easier,
especially when using Chrome dev tools which includes the metrics in the
Network Inspector. Here's an example:

![](https://d3vv6lp55qjaqc.cloudfront.net/items/371h2y3B3a0U470j040u/Image%202019-05-15%20at%205.40.37%20PM.png?)

Paired on this with @guilleiguaran
2021-09-19 21:27:07 -07:00
..
bin
exe
lib Add Server Timing middleware (#36289) 2021-09-19 21:27:07 -07:00
test Add Server Timing middleware (#36289) 2021-09-19 21:27:07 -07:00
.gitignore
CHANGELOG.md Fix railties/CHANGELOG.md for cookie_serializer 2021-09-16 09:48:09 +02:00
MIT-LICENSE
RDOC_MAIN.rdoc [ci skip] Fix broken links on RDOC_MAIN.rdoc 2021-04-30 09:22:28 +02:00
README.rdoc Fix grammar mistakes [ci skip] 2021-04-10 22:15:52 -05:00
Rakefile
railties.gemspec Move Zeitwerk to railties 2021-09-05 03:37:46 +02:00

README.rdoc

= Railties -- Gluing the Engine to the Rails

Railties is responsible for gluing all frameworks together. Overall, it:

* handles the bootstrapping process for a Rails application;

* manages the +rails+ command line interface;

* and provides the Rails generators core.

== Download

The latest version of Railties can be installed with RubyGems:

* gem install railties

Source code can be downloaded as part of the Rails project on GitHub

* https://github.com/rails/rails/tree/main/railties

== License

Railties is released under the MIT license:

* https://opensource.org/licenses/MIT

== Support

API documentation is at

* https://api.rubyonrails.org

Bug reports can be filed for the Ruby on Rails project here:

* https://github.com/rails/rails/issues

Feature requests should be discussed on the rails-core mailing list here:

* https://discuss.rubyonrails.org/c/rubyonrails-core