coach 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +2 -2
- data/lib/coach/request_benchmark.rb +2 -0
- data/lib/coach/version.rb +1 -1
- data/spec/lib/coach/request_benchmark_spec.rb +8 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f0c3cad8cac567d6a7896cb42598f1c9215cb92
|
4
|
+
data.tar.gz: a235b7b236bede96cb741f6a660fcb5a1a52790b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5211eac40826156ceb6687ecaa985d06b2173f09d1d6615b3439ac892ab2d9e823c21ee205cf4b4f74d52e289268b94def61ea4f37a35292cddf1f84ec21bd01
|
7
|
+
data.tar.gz: 514d4e0cde81513cc7d8386c926fca8ad7115bf8bc61e58e1cd5153d7cfa1a87069feddfa0eb9ca5f20066f270062da55c8739356d887e6cb576dea154dca029
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Coach
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/coach.svg)](http://badge.fury.io/rb/coach)
|
4
|
-
[![Build Status](https://travis-ci.org/gocardless/coach.
|
5
|
-
[![Code Climate](https://codeclimate.com/github/gocardless/coach.
|
4
|
+
[![Build Status](https://travis-ci.org/gocardless/coach.svg?branch=master)](https://travis-ci.org/gocardless/coach)
|
5
|
+
[![Code Climate](https://codeclimate.com/github/gocardless/coach.svg)](https://codeclimate.com/github/gocardless/coach)
|
6
6
|
|
7
7
|
Coach improves your controller code by encouraging:
|
8
8
|
|
@@ -22,6 +22,7 @@ module Coach
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def complete(start, finish)
|
25
|
+
@start = start
|
25
26
|
@duration = finish - start
|
26
27
|
end
|
27
28
|
|
@@ -29,6 +30,7 @@ module Coach
|
|
29
30
|
def stats
|
30
31
|
{
|
31
32
|
endpoint_name: @endpoint_name,
|
33
|
+
started_at: @start,
|
32
34
|
duration: format_ms(@duration),
|
33
35
|
chain: sorted_chain.map do |event|
|
34
36
|
{ name: event[:name], duration: format_ms(event[:duration]) }
|
data/lib/coach/version.rb
CHANGED
@@ -26,6 +26,14 @@ describe Coach::RequestBenchmark do
|
|
26
26
|
expect(stats[:duration]).to eq(5000)
|
27
27
|
end
|
28
28
|
|
29
|
+
it "captures the endpoint_name" do
|
30
|
+
expect(stats[:endpoint_name]).to eq("ENDPOINT")
|
31
|
+
end
|
32
|
+
|
33
|
+
it "captures the started_at time" do
|
34
|
+
expect(stats[:started_at]).to eq(base_time)
|
35
|
+
end
|
36
|
+
|
29
37
|
it "computes duration of middleware with no children" do
|
30
38
|
expect(stats[:chain]).to include(name: 'B', duration: 1000)
|
31
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coach
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GoCardless
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
150
|
version: '0'
|
151
151
|
requirements: []
|
152
152
|
rubyforge_project:
|
153
|
-
rubygems_version: 2.6.
|
153
|
+
rubygems_version: 2.6.11
|
154
154
|
signing_key:
|
155
155
|
specification_version: 4
|
156
156
|
summary: Alternative controllers built with middleware
|