benchmark_driver-output-rubybench 0.2.5 → 0.2.6

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
- SHA256:
3
- metadata.gz: 33120367bb95fb356b76c25c9756fb1881f624bebec61b9542a85ef1ef92ef8f
4
- data.tar.gz: af5401d85afa6ec4a39f7ad53993a7a2c700d0c418646c3809c28a94ac7e3751
2
+ SHA1:
3
+ metadata.gz: 351e0e9b9de34d91861916dad2e1f3c57f12c3f1
4
+ data.tar.gz: dc401dd80f95448d0d02db5e62130bfd16b97da5
5
5
  SHA512:
6
- metadata.gz: c2434335578a1839eeba09910cba1389bcb7d56408e530eb889539b7dbab07034ac495a463fd129d25d2989e4d71814dfd6b8e92d1d4a63a5b3c457c308413ac
7
- data.tar.gz: 14d601bfc294e16977af049aaf8cab74a1b6c2cc840db207f47e02d17ad89bc4744bed7ff2864715eeb4119a9d1299fcd9a1c8de30f97984cd730afff20cfebf
6
+ metadata.gz: 655cd208e7a344448dbe4cbb84f5017d8aeb318da4b874e1160db811dfd9dbc2653c6baf2a67a6352ceeaa8b124db36ee563d212a298d667963776250820c9b2
7
+ data.tar.gz: c54bd68ded4d89a0c2deba25c0cbbd562d6bde588f97d5ee73ed9b7b76fb34c654c945e29b4bb425287301787215383cb777c44fc822f71011af05aac28ebe33
@@ -1,7 +1,7 @@
1
1
  module BenchmarkDriver
2
2
  module Output
3
3
  class Rubybench
4
- VERSION = "0.2.5"
4
+ VERSION = "0.2.6"
5
5
  end
6
6
  end
7
7
  end
@@ -70,15 +70,19 @@ class BenchmarkDriver::Runner::Rsskb
70
70
  )
71
71
 
72
72
  with_script(benchmark.render) do |path|
73
- output = IO.popen(['/usr/bin/time', *context.executable.command, path], err: [:child, :out], &:read)
74
- if $?.success?
75
- match_data = /^(?<user>\d+.\d+)user\s+(?<system>\d+.\d+)system\s+(?<elapsed1>\d+):(?<elapsed2>\d+.\d+)elapsed.+\([^\s]+\s+(?<maxresident>\d+)maxresident\)k$/.match(output)
76
- raise "Unexpected format given from /usr/bin/time:\n#{out}" unless match_data[:maxresident]
77
-
78
- Integer(match_data[:maxresident])
79
- else
80
- $stdout.print(output)
81
- BenchmarkDriver::Result::ERROR
73
+ Tempfile.open(['rsskb-', '.txt']) do |f|
74
+ stdout = IO.popen(['/usr/bin/time', *context.executable.command, path], err: f.path, &:read)
75
+ stderr = File.read(f.path)
76
+ if $?.success?
77
+ match_data = /^(?<user>\d+.\d+)user\s+(?<system>\d+.\d+)system\s+(?<elapsed1>\d+):(?<elapsed2>\d+.\d+)elapsed.+\([^\s]+\s+(?<maxresident>\d+)maxresident\)k$/.match(stderr)
78
+ raise "Unexpected format given from /usr/bin/time:\n#{out}" unless match_data[:maxresident]
79
+
80
+ Integer(match_data[:maxresident])
81
+ else
82
+ $stdout.print(stdout)
83
+ $stderr.print(stderr)
84
+ BenchmarkDriver::Result::ERROR
85
+ end
82
86
  end
83
87
  end
84
88
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: benchmark_driver-output-rubybench
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Kokubun
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-11 00:00:00.000000000 Z
11
+ date: 2018-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: benchmark_driver
@@ -89,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
89
  version: '0'
90
90
  requirements: []
91
91
  rubyforge_project:
92
- rubygems_version: 2.7.6
92
+ rubygems_version: 2.6.14.1
93
93
  signing_key:
94
94
  specification_version: 4
95
95
  summary: benchmark_driver plugin to output result to RubyBench