timers 4.0.4 → 4.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 +4 -4
- data/CHANGES.md +0 -8
- data/Gemfile +4 -0
- data/lib/timers/version.rb +1 -1
- data/spec/performance_spec.rb +20 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fd3554aab4028decec14d741c973f4ffe5d414a
|
4
|
+
data.tar.gz: 082bf7c3ec19a1d60df84d1b81a033a888e6b922
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 354c245b317b5cf5127b6bc0ce76d24c0c9c73f7a170afd4e2d7d286a007018a94ee9c628ce86793b799c71946e07a718d83154b3a8e1a25254adaea91e72725
|
7
|
+
data.tar.gz: 56d3a3b9d8e54171892347c7ab67dc936216c12bda07f910ddc3b766a99f7ccd8398179e980285ab7307d734a516d91623b93e68db1ae59cc3df686585f78f5f
|
data/CHANGES.md
CHANGED
@@ -1,11 +1,3 @@
|
|
1
|
-
4.0.4 (2015-09-01)
|
2
|
-
------------------
|
3
|
-
* Re-release of the `4.1.1` version under the `4.0.4` designation to work-around issues caused by yanking `4.0.2` a couple weeks ago.
|
4
|
-
|
5
|
-
4.1.1 (2015-08-21)
|
6
|
-
------------------
|
7
|
-
* Remove `RubyProf` from Gemfile and a test, due to it providing no substantial benefit while increasing problems building bundles under Rubinius.
|
8
|
-
|
9
1
|
4.1.0 (2015-08-16)
|
10
2
|
------------------
|
11
3
|
* Addition of `now_and_every` method; fires block immediately, then sets recurring timer.
|
data/Gemfile
CHANGED
data/lib/timers/version.rb
CHANGED
data/spec/performance_spec.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
+
|
1
2
|
require 'spec_helper'
|
3
|
+
require 'ruby-prof' unless RUBY_PLATFORM =~ /java/
|
2
4
|
|
3
5
|
# Event based timers:
|
4
6
|
|
@@ -39,7 +41,25 @@ require 'spec_helper'
|
|
39
41
|
# Serviced 1142649 events in 11.194903921 seconds, 102068.70405115146 e/s.
|
40
42
|
|
41
43
|
RSpec.describe Timers::Group do
|
44
|
+
if defined? RubyProf
|
45
|
+
before(:each) do
|
46
|
+
# Running RubyProf makes the code slightly slower.
|
47
|
+
RubyProf.start
|
48
|
+
puts "*** Running with RubyProf reduces performance ***"
|
49
|
+
end
|
42
50
|
|
51
|
+
after(:each) do |arg|
|
52
|
+
if RubyProf.running?
|
53
|
+
# file = arg.metadata[:description].gsub(/\s+/, '-')
|
54
|
+
|
55
|
+
result = RubyProf.stop
|
56
|
+
|
57
|
+
printer = RubyProf::FlatPrinter.new(result)
|
58
|
+
printer.print($stderr, min_percent: 1.0)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
43
63
|
it "runs efficiently" do
|
44
64
|
result = []
|
45
65
|
range = (1..500)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: timers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Arcieri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hitimes
|