overall_request_times 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f58db41c069691725293eddd56fa4b0dc5305e1a
4
- data.tar.gz: 02813a0d13297f01e0863bd16c2543407171f192
3
+ metadata.gz: 84a14eeb5acf97238ec3331d3f84dc2c5e90794c
4
+ data.tar.gz: ba8ce98404abca577b881174d8df636e94f2e65b
5
5
  SHA512:
6
- metadata.gz: d244ef863bfc6a7324952f1f5ba17d8a5be55d18ad70f7354e44cd06bf9726dbba77b2dd1cfade604e250db2bc07a718b12a2d983c848b051a595adb2f828324
7
- data.tar.gz: 0665a15ea6ea43e129073cb03cf5eef3114ef0bb41f7bdfe3ceae7efc0fe91d5fab6e24a92b7fc2e30160d67958a053b54f512c95cd6f24f7fe146f6f64b5a10
6
+ metadata.gz: 34cecd41d8d596dbbb2531091177235ca6af1bf62e5c05d9765773c94372eaa2d8cc283973007d339b56ceee8baa8c0f449564154a02f0ccf780db3439a74b12
7
+ data.tar.gz: 10d4a9d19188a6834c577648d95dff2d50ce7cce6bb0b76d422a1436c6ed9fc3dcdd95c0b8c163d3047b775cfc60742ad19c5b0955e5d33d3e0a50f531b5fbb9
@@ -46,6 +46,14 @@ module OverallRequestTimes
46
46
  end
47
47
  end
48
48
 
49
+ def totals_and_counts
50
+ @mutex.synchronize do
51
+ @registry.each_with_object({}) do |(remote_app_name, timer), acc|
52
+ acc[remote_app_name] = {total: timer.total, call_count: timer.call_count}
53
+ end
54
+ end
55
+ end
56
+
49
57
  def bm(remote_app_name, &block)
50
58
  start(remote_app_name)
51
59
  begin
@@ -1,3 +1,3 @@
1
1
  module OverallRequestTimes
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -36,6 +36,10 @@ module OverallRequestTimes
36
36
  registry.totals
37
37
  end
38
38
 
39
+ def self.totals_and_counts
40
+ registry.totals_and_counts
41
+ end
42
+
39
43
  def self.bm(remote_app_name, &block)
40
44
  registry.bm(remote_app_name, &block)
41
45
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: overall_request_times
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Donald Plummer