benchmark_driver 0.16.0 → 0.16.1
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/CHANGELOG.md +4 -0
- data/lib/benchmark_driver/output/simple.rb +8 -1
- data/lib/benchmark_driver/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2aa17cc07885ff406870c16844aa57b9230f81a1be2104627af5e21131ba9fb9
|
4
|
+
data.tar.gz: 6b3d0dfcc8fe50785811a98eb1d62093a90463150aff7eb7d1773c07a9c72391
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc65698d4628c758ec49a32769d9f4e86c1b3d2721777227e7bca285c32b75687e7ec05d93351c4df37ed789e1d96fb0e717fe56440b972e34f03ce04341ca9b
|
7
|
+
data.tar.gz: 139315d91d21b9f86a276a3257eec66bdff8f317dd358619d99a6fcdcafabbe9e1fb9a9837b4607f97dbcc2df911b0d11ac128d228c10c644d7336cecbf396e8
|
data/CHANGELOG.md
CHANGED
@@ -1,13 +1,18 @@
|
|
1
1
|
class BenchmarkDriver::Output::Simple
|
2
2
|
NAME_LENGTH = 10
|
3
3
|
|
4
|
+
OPTIONS = {
|
5
|
+
humanize: ['--output-humanize true|false', TrueClass, 'Humanize result numbers (default: true)'],
|
6
|
+
}
|
7
|
+
|
4
8
|
# @param [Array<BenchmarkDriver::Metric>] metrics
|
5
9
|
# @param [Array<BenchmarkDriver::Job>] jobs
|
6
10
|
# @param [Array<BenchmarkDriver::Context>] contexts
|
7
|
-
def initialize(metrics:, jobs:, contexts:)
|
11
|
+
def initialize(metrics:, jobs:, contexts:, options:)
|
8
12
|
@metrics = metrics
|
9
13
|
@context_names = contexts.map(&:name)
|
10
14
|
@name_length = jobs.map(&:name).map(&:size).max
|
15
|
+
@humanize = options.fetch(:humanize, true)
|
11
16
|
end
|
12
17
|
|
13
18
|
def with_warmup(&block)
|
@@ -78,6 +83,8 @@ class BenchmarkDriver::Output::Simple
|
|
78
83
|
end
|
79
84
|
|
80
85
|
def humanize(value)
|
86
|
+
return value unless @humanize
|
87
|
+
|
81
88
|
if BenchmarkDriver::Result::ERROR.equal?(value)
|
82
89
|
return " %#{NAME_LENGTH}s" % 'ERROR'
|
83
90
|
elsif value == 0.0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: benchmark_driver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.16.
|
4
|
+
version: 0.16.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takashi Kokubun
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -131,7 +131,7 @@ homepage: https://github.com/benchmark-driver/benchmark-driver
|
|
131
131
|
licenses:
|
132
132
|
- MIT
|
133
133
|
metadata: {}
|
134
|
-
post_install_message:
|
134
|
+
post_install_message:
|
135
135
|
rdoc_options: []
|
136
136
|
require_paths:
|
137
137
|
- lib
|
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
147
|
version: '0'
|
148
148
|
requirements: []
|
149
149
|
rubygems_version: 3.3.7
|
150
|
-
signing_key:
|
150
|
+
signing_key:
|
151
151
|
specification_version: 4
|
152
152
|
summary: Fully-featured accurate benchmark driver for Ruby
|
153
153
|
test_files: []
|