time_bandits 0.8.0 → 0.8.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: 116ff4f8110fea48a1fce36cea8362c06d9df6f5
4
- data.tar.gz: 700559c495052c511e3b7ec61162249181653fcc
3
+ metadata.gz: a2bf8615592babb13d98e031f188af5e32534787
4
+ data.tar.gz: fed920d5ae867566c440d4cf47f766b9ae629395
5
5
  SHA512:
6
- metadata.gz: 6e215bb352bd437f48d955a387514006feedabb8b636fe3fe9abc65265af289a90d80e5c8eabba0cc3249b53729df2b2d37c0a1d00165ae857f5222b56726920
7
- data.tar.gz: b761564d4c867a55bec84221c674901cf223312de4788714e37a5cb999c044b001a2857f03b318740a335b109e6f8e74ea383715b7f92d78d701a31d334923bd
6
+ metadata.gz: 725590a1323873a12b9d0e165b3fcd9365604c4e89d542be07f74ff24ac29eb5490838de3ba4246b8a11afcb3115880c7d581104cdb8992ce4d361808a6a8516
7
+ data.tar.gz: ebfb15dc0488a39a9fd9d4c1f4602347fbdbfe4c0d43a05efa6008226cfe9b2f1b711215a7aed39f9dfcd283348e7364ce2bb2a8dc67077751487b6aa91b3cf8
@@ -90,6 +90,7 @@ module TimeBandits
90
90
  def consumed
91
91
  0.0
92
92
  end
93
+ alias_method :current_runtime, :consumed
93
94
 
94
95
  def consumed_gc_time # ms
95
96
  (_get_gc_time - @consumed).to_f / 1000
@@ -1,3 +1,3 @@
1
1
  module TimeBandits
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.1"
3
3
  end
@@ -28,6 +28,8 @@ class ActiveSupportNotificationsTest < Test::Unit::TestCase
28
28
 
29
29
  test "getting metrics" do
30
30
  assert_equal({:simple_calls => 0, :simple_time => 0}, TimeBandits.metrics)
31
+ assert_equal 0, TimeBandits.consumed
32
+ assert_equal 0, TimeBandits.current_runtime
31
33
  end
32
34
 
33
35
  test "formatting" do
@@ -18,6 +18,8 @@ class DalliTest < Test::Unit::TestCase
18
18
  :memcache_writes => 0
19
19
  }
20
20
  assert_equal nothing_measured, TimeBandits.metrics
21
+ assert_equal 0, TimeBandits.consumed
22
+ assert_equal 0, TimeBandits.current_runtime
21
23
  end
22
24
 
23
25
  test "formatting" do
@@ -16,6 +16,8 @@ class DatabaseTest < Test::Unit::TestCase
16
16
  :db_sql_query_cache_hits => 0
17
17
  }
18
18
  assert_equal nothing_measured, TimeBandits.metrics
19
+ assert_equal 0, TimeBandits.consumed
20
+ assert_equal 0, TimeBandits.current_runtime
19
21
  end
20
22
 
21
23
  test "formatting" do
@@ -20,6 +20,8 @@ class GCConsumerTest < Test::Unit::TestCase
20
20
  }
21
21
  m = TimeBandits.metrics
22
22
  assert_equal sample.keys.sort, m.keys.sort
23
+ assert_equal 0, TimeBandits.consumed
24
+ assert_equal 0, TimeBandits.current_runtime
23
25
  end
24
26
 
25
27
  test "formatting" do
@@ -18,6 +18,8 @@ class MemcachedTest < Test::Unit::TestCase
18
18
  :memcache_writes => 0
19
19
  }
20
20
  assert_equal nothing_measured, TimeBandits.metrics
21
+ assert_equal 0, TimeBandits.consumed
22
+ assert_equal 0, TimeBandits.current_runtime
21
23
  end
22
24
 
23
25
  test "formatting" do
@@ -15,6 +15,8 @@ class RedisTest < Test::Unit::TestCase
15
15
  :redis_calls => 0
16
16
  }
17
17
  assert_equal nothing_measured, TimeBandits.metrics
18
+ assert_equal 0, TimeBandits.consumed
19
+ assert_equal 0, TimeBandits.current_runtime
18
20
  end
19
21
 
20
22
  test "formatting" do
@@ -14,6 +14,8 @@ class SequelTest < Test::Unit::TestCase
14
14
  :db_calls => 0
15
15
  }
16
16
  assert_equal nothing_measured, metrics
17
+ assert_equal 0, TimeBandits.consumed
18
+ assert_equal 0, TimeBandits.current_runtime
17
19
  end
18
20
 
19
21
  test "formatting" do
@@ -40,4 +42,4 @@ class SequelTest < Test::Unit::TestCase
40
42
  def bandit
41
43
  TimeBandits::TimeConsumers::Sequel.instance
42
44
  end
43
- end
45
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: time_bandits
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Kaes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-10 00:00:00.000000000 Z
11
+ date: 2016-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thread_variables