server_timing_middleware 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2df08aea356dd69998109fc6d2f3b6e6839aa079
4
- data.tar.gz: ceb7508b05fd3e64ba0d85cde509f7ca33b979b7
3
+ metadata.gz: 833ad411214972b9033b1629011710dade81ca12
4
+ data.tar.gz: 16d99c445c982876d4d350099b90920a01165ed2
5
5
  SHA512:
6
- metadata.gz: 16dbb484225727cbc3e300a6dad4a38f409805331caf71c4bf749580d614dd410ee3186f0cd55730e7b94244e911123645badb4504a31527826529081aefbc9f
7
- data.tar.gz: 959c70168a743ee404cdf2056d923ca45757291b27e10450facca72aecfeb3e51a0f93f5941763d20956a382f95827622d4a2621e3730c869437dd9ed3524f8f
6
+ metadata.gz: bacce43ae907e93636db141a89271a7430f99a5926b1ad035ac0cf28664872b1ebeef0ceba6ef0c1c997c625ab266cdc5dfdc93843e92b5227444c8462442277
7
+ data.tar.gz: 80d18420e0f175affdba169a7ef1e7f20886dbc09a38d908c85f9e1e505d39c7b659ec4ecfc03c4d993e48d18d12ba53c69b4c09f5bfd8e6c59badb0b3c01e39
data/README.md CHANGED
@@ -1,9 +1,14 @@
1
1
  # ServerTimingMiddleware
2
2
 
3
+ [![Build Status](https://travis-ci.org/javierhonduco/server_timing_middleware.svg?branch=master)](https://travis-ci.org/javierhonduco/server_timing_middleware)
4
+
3
5
  This is a simple Rack Middleware that can be plugged in apps which use `ActiveSupport::Notifications` such as Rails apps, to retrieve all the events and send them as a header so they can be seen in Server Timing compliant clients, such as Chrome's `Network > Timing`.
4
6
 
5
7
  :warning: Take into account this has not been tested in production. It might have memory leaks or slow down your application.
6
8
 
9
+ This is how it looks in Chrome's inspector:
10
+ ![image](https://cloud.githubusercontent.com/assets/959128/24759919/4866f1ce-1ae7-11e7-832c-f8aaf3a27f78.png)
11
+
7
12
  ## Installation
8
13
 
9
14
  Add this line to your application's Gemfile:
@@ -1,3 +1,3 @@
1
1
  module ServerTimingMiddleware
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -39,9 +39,9 @@ module Rack
39
39
  }
40
40
 
41
41
  # Example output:
42
- # 'cpu=0.009; "CPU", mysql=0.005; "MySQL", filesystem=0.006; "Filesystem"'
42
+ # 'cpu;dur=0.009;desc="CPU", mysql;dur=0.005;desc="MySQL", filesystem;dur=0.006;desc="Filesystem"'
43
43
  headers['Server-Timing'] = mapped_events.map do |name, elapsed_time|
44
- "#{name}=#{elapsed_time}; \"#{name}\""
44
+ "#{name};dur=#{elapsed_time};desc=\"#{name}\""
45
45
  end.join(', ')
46
46
 
47
47
  [status, headers, body]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: server_timing_middleware
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Honduvilla Coto
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-04-06 00:00:00.000000000 Z
11
+ date: 2018-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  version: '0'
107
107
  requirements: []
108
108
  rubyforge_project:
109
- rubygems_version: 2.5.1
109
+ rubygems_version: 2.6.8
110
110
  signing_key:
111
111
  specification_version: 4
112
112
  summary: Rack middleware to send backend timings using the Server Timing spec.