rbbt-util 5.26.109 → 5.26.110
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/share/rbbt_commands/workflow/trace +20 -9
- 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: b657fc00a35c1639969f733d9b0c82aeab12217bb6c315b2e5e6b52835b9cc63
|
4
|
+
data.tar.gz: 6a6b00315447deb586accd24b2b3343398186bac96fff97690d99144b23d7608
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
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.
|
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-
|
11
|
+
date: 2020-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|