fasten 0.8.8 → 0.10.0

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
  SHA256:
3
- metadata.gz: 8676c0dabe61dbc24c1ac60dcf94978c1be59164d3f5e984baa22aac659429cf
4
- data.tar.gz: a45dc9af10e008c126ae334ea3629dff04e0317217aad0d9da78370a6a00152d
3
+ metadata.gz: a4f1399b63f43e69c81204967541b3f37501f0eceaa29cdc1f559fe3cad2a624
4
+ data.tar.gz: aa29489a9c7c516ba209c1ad9d4d777eb85829a4b2c050407778c312a4647f90
5
5
  SHA512:
6
- metadata.gz: 3b337229f16bf52aa3d8e2ba55d82584f5658aabd552d98c57ca833978cee980c3b0833b8ac8e219a5ce916f4aa6e9b8befb85925dfa354b91638bbe28c3a327
7
- data.tar.gz: 79bfb314e3ece8694c2968c0ee376a4d22214872d6e7cd90771931307e45f6f48258ddaad4f37476a3103a56b10a67fba814e455a2558fce0f2bed55898f67d6
6
+ metadata.gz: d0553cc25064568b62ab6ff4b3ba63a8fc10c1d09493cfc0844758be24f509b9fd0ae372f335cbdc06facbb58159026b9526c694631d47250c625af91785c82c
7
+ data.tar.gz: 99b50c0529c54ecd65adf2a4127fd744c9b240035178e476cfbdb0770c5ed4c7a8bbf1fc488b07e564e977060361924c4ebded669ed5f2583c29096f37099292
@@ -25,6 +25,10 @@ module Fasten
25
25
  stats_data << row.to_h
26
26
  end
27
27
 
28
+ @tasks.each do |task|
29
+ stats_last(task)
30
+ end
31
+
28
32
  @tasks.waiting = nil
29
33
  rescue StandardError
30
34
  nil
@@ -33,7 +37,7 @@ module Fasten
33
37
  def save_stats
34
38
  return unless @stats_path && stats_data
35
39
 
36
- keys = %w[state kind name run cnt avg std err]
40
+ keys = %w[state kind name run cnt avg std err ini fin]
37
41
 
38
42
  CSV.open(@stats_path, 'wb') do |csv|
39
43
  csv << keys
@@ -149,9 +149,10 @@ module Fasten
149
149
 
150
150
  @pending -= to_move
151
151
  @waiting += to_move
152
- @waiting.sort_by!.with_index do |x, index|
153
- x.state = :WAIT
154
- [-x.run_score, index]
152
+ @waiting.sort_by!.with_index do |task, index|
153
+ task.state = :WAIT
154
+ last_avg = task.last && task.last['avg'] || 0
155
+ [-task.run_score, -last_avg.to_f, index]
155
156
  end
156
157
  end
157
158
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Fasten
4
- VERSION = '0.8.8'
4
+ VERSION = '0.10.0'
5
5
  end
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.8.8
4
+ version: 0.10.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: 2019-10-03 00:00:00.000000000 Z
11
+ date: 2019-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler