Skip to content

Commit

Permalink
protect against probe jobs returning no events. Fix dmwm#6926
Browse files Browse the repository at this point in the history
  • Loading branch information
belforte committed Jan 12, 2022
1 parent 23d2bf4 commit 9a1ab51
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/python/TaskWorker/Actions/PreDAG.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,18 @@ def executeInternal(self, *args):
sumEventsThr += throughput
sumEventsSize += eventsize
count += 1
eventsThr = sumEventsThr / count
eventsSize = sumEventsSize / count
if count > 0:
eventsThr = sumEventsThr / count
eventsSize = sumEventsSize / count

self.logger.info("average throughput for %s jobs: %s evt/s", count, eventsThr)
self.logger.info("average eventsize for %s jobs: %s bytes", count, eventsSize)

if eventsThr == 0:
retmsg = "Splitting failed because all probe jobs failed or anyhow failed to provide estimates"
self.logger.error(retmsg)
return 1

maxSize = getattr(config.TaskWorker, 'automaticOutputSizeMaximum', 5 * 1000**3)
maxEvents = (maxSize / eventsSize) if eventsSize > 0 else 0

Expand Down

0 comments on commit 9a1ab51

Please sign in to comment.