benchmark-perf 0.2.0 → 0.2.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: 0f7284dedb5487f685a88a4de95d40e9ee55dffa
4
- data.tar.gz: 3d10614990b23154c9c9f010def6b0fd88ab4d50
3
+ metadata.gz: a43708c402ffa6a74980be287c96ebd39ff118c1
4
+ data.tar.gz: 1d39bed38014e93c1393f48faf99b9b560834e3e
5
5
  SHA512:
6
- metadata.gz: 9b73856c9343f95e520e514aaa49bf706cfe83e674191eefb09c7b50fc264d4cadf340ae04ea9d9b38c990ed4b9bcf9030ea5856653efadca6a78ee60c07db99
7
- data.tar.gz: 950f7c866e8696dbd79022da75252350e38693922387768221de0d35b23cfc6a221d0485b153973076de39d5cdee3616a1440e80d443471b24726faeb4539fe0
6
+ metadata.gz: 98d780c7f0143805be987a3b1be952dc6e3f3e29d4c00b4deb1be068c7316536434cb5efe48bb475b68e13c2dc9761b5cce2d996ee3910322da0f34beaefb2f7
7
+ data.tar.gz: ab929e3393f5621a45fccd5b63950b215a9fa86dc23f643881e3119896e6e3905192c3bd8c7f0080a27e2841cc0c996041d6d501cd89df448d0a6c33c5164d8c
data/.travis.yml CHANGED
@@ -9,17 +9,18 @@ rvm:
9
9
  - 2.2.5
10
10
  - 2.3.1
11
11
  - ruby-head
12
- - jruby-9.1.1.0
13
- - jruby-head
14
- - rbx-3.60
15
- env:
16
- global:
17
- - JRUBY_OPTS="-Xcli.debug=true --debug"
12
+ - rbx
18
13
  matrix:
14
+ include:
15
+ - rvm: jruby
16
+ env: JRUBY_OPTS='--server -Xcompile.invokedynamic=false -Xcompat.version=2.0'
17
+ - rvm: jruby-9.1.2.0
18
+ env: JRUBY_OPTS='--server -Xcompile.invokedynamic=false'
19
19
  allow_failures:
20
- - rvm: rbx-3.60
20
+ - rvm: rbx
21
21
  - rvm: ruby-head
22
22
  - rvm: jruby-head
23
+ env: JRUBY_OPTS='--server -Xcompile.invokedynamic=false'
23
24
  fast_finish: true
24
25
  branches:
25
26
  only: master
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Change log
2
2
 
3
+ ## [v0.2.0] - 2016-11-03
4
+
5
+ ### Changed
6
+ * Remove rescuing marshalling errors
7
+
3
8
  ## [v0.2.0] - 2016-11-01
4
9
 
5
10
  ### Added
@@ -20,6 +25,7 @@
20
25
 
21
26
  Initial release
22
27
 
28
+ [v0.2.1]: https://github.com/peter-murach/benchmark-perf/compare/v0.2.0...v0.2.1
23
29
  [v0.2.0]: https://github.com/peter-murach/benchmark-perf/compare/v0.1.1...v0.2.0
24
30
  [v0.1.1]: https://github.com/peter-murach/benchmark-perf/compare/v0.1.0...v0.1.1
25
31
  [v0.1.0]: https://github.com/peter-murach/benchmark-perf/compare/v0.1.0
data/Gemfile CHANGED
@@ -8,7 +8,7 @@ group :development do
8
8
  end
9
9
 
10
10
  group :metrics do
11
- gem 'coveralls', '~> 0.8.9'
12
- gem 'simplecov', '~> 0.10.0'
11
+ gem 'coveralls', '~> 0.8.15'
12
+ gem 'simplecov', '~> 0.12.0'
13
13
  gem 'yardstick', '~> 0.9.9'
14
14
  end
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Benchmark
4
4
  module Perf
5
- MarshalError = Class.new(StandardError)
6
-
7
5
  # Measure length of time the work could take on average
8
6
  #
9
7
  # @api public
@@ -68,13 +66,9 @@ module Benchmark
68
66
 
69
67
  writer.close unless writer.closed?
70
68
  Process.waitpid(pid)
71
- begin
72
- data = Marshal.load(reader)
73
- raise data if data.is_a?(Exception)
74
- data
75
- rescue => error
76
- raise MarshalError, "#{error.class}: #{error.message}"
77
- end
69
+ data = Marshal.load(reader)
70
+ raise data if data.is_a?(Exception)
71
+ data
78
72
  end
79
73
 
80
74
  # Run warmup measurement
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Benchmark
4
4
  module Perf
5
- VERSION = "0.2.0"
5
+ VERSION = "0.2.1"
6
6
  end # Perf
7
7
  end # Benchmark
@@ -24,18 +24,10 @@ RSpec.describe Benchmark::Perf::ExecutionTime do
24
24
  }.to raise_error(StandardError)
25
25
  end
26
26
 
27
- it "fails to load marshalled data" do
28
- bench = described_class.new
29
- allow(Marshal).to receive(:load).and_raise('boo')
30
- expect {
31
- bench.run { 'x' * 1024 }
32
- }.to raise_error(Benchmark::Perf::MarshalError)
33
- end
34
-
35
27
  it "measures complex object" do
36
28
  bench = described_class.new
37
29
  sample = bench.run { {foo: Object.new, bar: :piotr} }
38
- expect(sample).to all(be < 0.001)
30
+ expect(sample).to all(be < 0.01)
39
31
  end
40
32
 
41
33
  it "executes code to warmup ruby vm" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: benchmark-perf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Murach
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-01 00:00:00.000000000 Z
11
+ date: 2016-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler