rbbt-util 5.26.109 → 5.26.110

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d7631a86ef9abbc364fa0ea3510d30b9c54681f86cb700c398b7c1f35515d246
4
- data.tar.gz: 3796828805b1be113f077db4b11fe199aeaf90538277459fe1b4ae842f03c87d
3
+ metadata.gz: b657fc00a35c1639969f733d9b0c82aeab12217bb6c315b2e5e6b52835b9cc63
4
+ data.tar.gz: 6a6b00315447deb586accd24b2b3343398186bac96fff97690d99144b23d7608
5
5
  SHA512:
6
- metadata.gz: cfb61f231fef400d226945bc6ebdb5a4494f07008ec41cfb15694778af6b035995e8d91e881f60560ca5cacdeef1959ab7402c37707c739655586e2cc06719c0
7
- data.tar.gz: 51017d704f0c4a8a366100211370c65126057429e62ed50a05b787306d895ef316bf17529e8d0f7137e98e0ef9c9d8bdcb0437551e6d21b59a2cfdc1022a5c69
6
+ metadata.gz: a0b79bd5ac75de92ab7ce708d74be005d218dab0354a217465556d7a082920256f44a7daf6c90d9f76b614170a1702ec9672ab4da1b90144c3419aa22282c4eb
7
+ data.tar.gz: b30d54a1b95950b4e49923050bbb26bdbbda742a3b973beefe297336574201b7cab686986a20f4bbfe0b52485faa727b52b6f942d77aa41e50481219e7ab3fd5
@@ -6,7 +6,7 @@ require 'rbbt-util'
6
6
  require 'fileutils'
7
7
  require 'rbbt/util/simpleopt'
8
8
  require 'rbbt/workflow/step'
9
- require 'rbbt/workflow/provenance'
9
+ require 'rbbt/workflow/util/provenance'
10
10
  require 'rbbt/util/misc'
11
11
 
12
12
  require 'rbbt-util'
@@ -47,23 +47,33 @@ end
47
47
 
48
48
  step = get_step file
49
49
 
50
- data = TSV.setup({}, "Job~Workflow,Task,Start,End#:type=:list")
51
50
 
52
51
  jobs = step.rec_dependencies + [step]
53
52
 
53
+ step.info[:archived_info].each do |path,ainfo|
54
+ archived_step = Step.new path
55
+ class << archived_step
56
+ self
57
+ end.define_method :info do
58
+ ainfo
59
+ end
60
+ jobs << archived_step
61
+ end
62
+
54
63
  jobs = jobs.select{|job| job.info[:done]}.sort_by{|job| job.info[:started]}
55
64
 
65
+ data = TSV.setup({}, "Job~Workflow,Task,Start,End#:type=:list")
56
66
  min_start = nil
57
67
  max_done = nil
58
68
  jobs.each do |job|
59
- next unless job.done?
69
+ next unless job.info[:done]
60
70
  started = job.info[:started]
61
71
  ddone = job.info[:done]
62
72
 
63
73
  code = [job.workflow, job.task_name].compact.collect{|s| s.to_s} * "."
64
- code = code + '.' + job.clean_name
74
+ code = code + '.' + job.name
65
75
 
66
- data[code] = [job.workflow.to_s, job.task_name,started,ddone]
76
+ data[code] = [job.workflow.to_s, job.task_name, started, ddone]
67
77
  if min_start.nil?
68
78
  min_start = started
69
79
  else
@@ -90,7 +100,7 @@ if options[:fix_gap]
90
100
  data.through do |k,values|
91
101
  start, eend = values.values_at "Start.second", "End.second"
92
102
 
93
- ranges << (start.floor..eend.ceil)
103
+ ranges << (start..eend)
94
104
  end
95
105
 
96
106
  gaps = {}
@@ -118,7 +128,7 @@ end
118
128
  tasks_info = {}
119
129
 
120
130
  jobs.each do |dep|
121
- next unless dep.done?
131
+ next unless dep.info[:done]
122
132
  task = [dep.workflow, dep.task_name].compact.collect{|s| s.to_s} * "#"
123
133
  info = tasks_info[task] ||= {}
124
134
 
@@ -142,13 +152,14 @@ jobs.each do |dep|
142
152
  info[:shard] = shard
143
153
  end
144
154
 
145
- stats = TSV.setup({}, "Task~Calls,Time,Cpus,Spark,Shard#:type=:list")
155
+ stats = TSV.setup({}, "Task~Calls,Avg. Time,Total Time,Cpus,Spark,Shard#:type=:list")
146
156
 
147
157
  tasks_info.each do |task, info|
148
158
  time_lists, cpus, spark, shard = info.values_at :time, :cpus, :spark, :shard
149
159
  avg_time = Misc.mean(time_lists).to_i
160
+ total_time = Misc.sum(time_lists)
150
161
  calls = time_lists.length
151
- stats[task] = [calls,avg_time, cpus, spark, shard]
162
+ stats[task] = [calls, avg_time, total_time, cpus, spark, shard]
152
163
  end
153
164
 
154
165
  raise "No jobs to process" if data.size == 0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-util
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.26.109
4
+ version: 5.26.110
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-08 00:00:00.000000000 Z
11
+ date: 2020-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake