winr 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/bin/winr +3 -2
- data/winr.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba8bbf65060f86c1c4e4c4b5ed6949292cf8668cb799f53552c139a9ccc58f7a
|
4
|
+
data.tar.gz: 7609cc91cac4a78f8f7d6746d666ba711739773e75c61640e302ad76bd114d8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c3d5611e76d98e022306023455b704d7d9e06e725eeac96fa779ec7b7ba3554a8684ee6f8ff7a763175bb8f172928302693dbd8ce7ca5caf8c06d120005da29
|
7
|
+
data.tar.gz: c8332f1ca9f8dd3d5e400098644be5c3188ffe0b8ec732f27b5b7c1677d50989a90aff561d4d6dc920aab4e517be4c47afab441c3e52a495698dc3062a004427
|
data/README.md
CHANGED
@@ -117,6 +117,10 @@ $ winr test/sum.rb
|
|
117
117
|
└──────────────────┴─────────────┴──────────────┴────────┘
|
118
118
|
```
|
119
119
|
|
120
|
+
The following screenshot shows the output (notice the units and color), when the value of `max` is changed to `1e3`.
|
121
|
+
|
122
|
+
<img src="https://user-images.githubusercontent.com/142875/219610505-64569102-f294-4b2b-b08b-c103d18da247.png" width="640">
|
123
|
+
|
120
124
|
## Install
|
121
125
|
|
122
126
|
Install via `rubygems` with:
|
data/bin/winr
CHANGED
@@ -60,6 +60,7 @@ show.empty? and abort "invalid list of statistics #{opts[:stats].inspect}"
|
|
60
60
|
|
61
61
|
# ==[ Define some constants, ansi codes, and make hashes more flexible ]==
|
62
62
|
|
63
|
+
# used by the scale() method below
|
63
64
|
Infinity = 1.0 / 0
|
64
65
|
Overflow = "\n\nERROR: numeric overflow"
|
65
66
|
|
@@ -75,7 +76,7 @@ module Ansi
|
|
75
76
|
ansi
|
76
77
|
end
|
77
78
|
def ansi (*list); list.map {|code| "\e[#{$ansi[code.to_s] || 0}m"}.join + self; end
|
78
|
-
def ansi!(*list); ansi(*list)
|
79
|
+
def ansi!(*list); ansi(*list, :reset); end
|
79
80
|
end
|
80
81
|
end
|
81
82
|
|
@@ -195,7 +196,7 @@ end
|
|
195
196
|
|
196
197
|
def scale(show, unit)
|
197
198
|
slot = 3
|
198
|
-
span = ["G", "M", "K", " ", "m", "µ", "
|
199
|
+
span = ["G", "M", "K", " ", "m", "µ", "n"]
|
199
200
|
[0, Infinity].include?(show) and abort Overflow
|
200
201
|
show *= 1000.0 and slot += 1 while show > 0 && show < 1.0
|
201
202
|
show /= 1000.0 and slot -= 1 while show >= 1000.0
|
data/winr.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: winr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Shreeve
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A quick and lightweight benchmarking tool for Ruby
|
14
14
|
email: steve.shreeve@gmail.com
|