fasten 0.14.4 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/fasten/ui/console.rb +22 -2
- data/lib/fasten/version.rb +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: d3ee0cd8e9128821758efe48a22b7a46150383006040c3681a91ec7a90cbce50
|
4
|
+
data.tar.gz: d0e85d0f4931e26145d4733a3d9e7f3caff9878fb2e44397b6a95102d0fdfa34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f701744c40a44fe18d352841f3210136f4a16487bacd4e982b772311edceb5c406d9b579a67c4513243a8200a3a82dab7592d6942a113677b43b54cf2a5fd60f
|
7
|
+
data.tar.gz: b1ca8984102cdf0223851b62206719eaf369252dfe40c8e3ff10cb0b1fdaa070713f0f83b476fcb2127e61249bb283b6c58fa866338f064d3aecbaa61abc4b2f
|
data/Gemfile.lock
CHANGED
data/lib/fasten/ui/console.rb
CHANGED
@@ -20,7 +20,7 @@ module Fasten
|
|
20
20
|
puts <<~FIN
|
21
21
|
|
22
22
|
= == === ==== ===== ====== ======= ======== ========= ==========
|
23
|
-
Fasten your seatbelts! #{'💺' * jobs} #{runner.use_threads ? 'threads' : 'processes'}
|
23
|
+
Fasten your seatbelts! #{'💺' * jobs} #{jobs} #{runner.use_threads ? 'threads' : 'processes'} #{tasks.count} tasks
|
24
24
|
|
25
25
|
#{name}
|
26
26
|
FIN
|
@@ -48,9 +48,29 @@ module Fasten
|
|
48
48
|
def display_task_message(orig, old, message)
|
49
49
|
return unless old.count != orig.count
|
50
50
|
|
51
|
+
elapsed_str = hformat Time.new - runner.ini
|
52
|
+
|
53
|
+
time_str = [elapsed_str, eta_str].compact.join(' ')
|
54
|
+
|
51
55
|
(orig - old).each do |task|
|
52
|
-
puts "Time: #{hformat Time.new - runner.ini} #{message} #{hformat task.dif} #{task.worker} Task #{task}"
|
53
56
|
old << task
|
57
|
+
puts "#{count_str(old.count, tasks.count)} Time: #{time_str} #{message} #{hformat task.dif} #{task.worker} Task #{task}"
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
def count_str(count, total)
|
62
|
+
len = total.to_s.length
|
63
|
+
format "%#{len}d/%#{len}d", count, total
|
64
|
+
end
|
65
|
+
|
66
|
+
def eta_str
|
67
|
+
@eta_str ||= begin
|
68
|
+
@runner_last_avg = runner.last_avg
|
69
|
+
if runner.last_avg && runner.last_err
|
70
|
+
format 'ETA ≈ %s ± %.2f', hformat(runner.last_avg), runner.last_err
|
71
|
+
elsif runner.last_avg
|
72
|
+
format 'ETA ≈ %s', hformat(runner.last_avg)
|
73
|
+
end
|
54
74
|
end
|
55
75
|
end
|
56
76
|
end
|
data/lib/fasten/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fasten
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aldrin Martoq
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-06-
|
11
|
+
date: 2021-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curses
|