File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
modules/nextflow/src/main/groovy/nextflow/trace Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -105,20 +105,30 @@ class WorkflowStats {
105
105
tot ? Math . round(failedCount / tot * 10000.0 as float) / 100.0 as float : 0
106
106
}
107
107
108
+ protected Duration makeDuration(long value) {
109
+ try {
110
+ new Duration (value)
111
+ }
112
+ catch ( Throwable e ) {
113
+ log. warn " Oops... not a valid workflow stats duration value=$value " , e
114
+ return new Duration (0 )
115
+ }
116
+ }
117
+
108
118
/**
109
119
* @return Overall workflow compute time (CPUs-seconds) for task executed successfully
110
120
*/
111
- Duration getSucceedDuration() { new Duration (succeedMillis) }
121
+ Duration getSucceedDuration() { makeDuration (succeedMillis) }
112
122
113
123
/**
114
124
* @return Overall workflow compute time (CPUs-seconds) for failed tasks
115
125
*/
116
- Duration getFailedDuration() { new Duration (failedMillis) }
126
+ Duration getFailedDuration() { makeDuration (failedMillis) }
117
127
118
128
/**
119
129
* @return Overall workflow compute time (CPUs-seconds) for cached tasks
120
130
*/
121
- Duration getCachedDuration() { new Duration (cachedMillis) }
131
+ Duration getCachedDuration() { makeDuration (cachedMillis) }
122
132
123
133
/**
124
134
* @return Succeed tasks count
You can’t perform that action at this time.
0 commit comments