Returns True if this build should be reported for this contact
        (eliminating duplicates), and also records the report for later
163763
def shouldReportBuild(self, builder, buildnum):
        """"""
        for w, b, n in self.reported_builds:
            if b == builder and n == buildnum:
                return False
        self.reported_builds.append([util.now(), builder, buildnum])

        # clean the reported builds
        horizon = util.now() - 60
        while self.reported_builds and self.reported_builds[0][0] < horizon:
            self.reported_builds.pop(0)

        # and return True, since this is a new one
        return True
1163458
def _handle_report(self, report):
        """"""

        keep_report = True

        if self.report_callback is not None:
            keep_report = self.report_callback(report, self.context)

        if keep_report:
            self.reports.append(report)
431568
private void checkForAbandonedTask(Tenant tenant, TaskRecord taskRecord, long minsSinceLastActivity) {
        if (minsSinceLastActivity > DEAD_TASK_THRESHOLD_MINS) {
            String taskIdentity = createMapKey(tenant, taskRecord.getTaskID());
            String reason = "No progress reported in " + minsSinceLastActivity + " minutes";
            m_logger.error("Remote task {} has not reported progress in {} minutes; marking as failed",
                           taskIdentity, minsSinceLastActivity);
            taskRecord.setProperty(TaskRecord.PROP_FINISH_TIME, Long.toString(System.currentTimeMillis()));
            taskRecord.setProperty(TaskRecord.PROP_FAIL_REASON, reason);
            taskRecord.setStatus(TaskStatus.FAILED);
            updateTaskStatus(tenant, taskRecord, true);
        }
    }
904634
def _should_send(self, rebuild, success, auto_canceled, manual_canceled):
        
        should_send = False

        should_send_mapping = {
            self.MANUAL_SUCCESS: not rebuild and success,
            self.MANUAL_FAIL: not rebuild and not success,
            self.MANUAL_CANCELED: not rebuild and manual_canceled,
            self.AUTO_SUCCESS: rebuild and success,
            self.AUTO_FAIL: rebuild and not success,
            self.AUTO_CANCELED: rebuild and auto_canceled
        }

        for state in self.send_on:
            should_send |= should_send_mapping[state]
        return should_send
888456
function report() {
      return Object.keys(eventsByFilename)
        .filter(testIncluded)
        .reduce(reduceFilenames, {});

      function testIncluded(filename) {
        return !excludeRegex || !excludeRegex.test(filename);
      }

      function reduceFilenames(reduced, filename) {
        var totalsByKey = {},
            list        = eventsByFilename[filename],
            lastKey     = null,
            lastTime    = NaN;

        // events consist of time,key pairs
        for (var i = 0; i < list.length; i += 2) {
          var time = list[i],
              key  = list[i + 1];
          if (lastKey) {
            var initial = totalsByKey[key] || 0,
                delta   = ((time - lastTime) / 1000) || 0;
            totalsByKey[lastKey] = initial + delta;
          }
          lastKey = key;
          lastTime = time;
        }

        // total at the end to guarantee consistency
        var total = 0;
        for (var key in totalsByKey) {
          total += totalsByKey[key];
        }
        totalsByKey.total = total;

        // store by the short filename
        var short = path.relative(process.cwd(), filename);
        reduced[short] = totalsByKey;
        return reduced;
      }
    }
1341451
public void report(long arrivalTime) {
    checkArgument(arrivalTime >= 0, "arrivalTime must not be negative");
    long latestHeartbeat = history.latestHeartbeatTime();
    history.samples().addValue(arrivalTime - latestHeartbeat);
    history.setLatestHeartbeatTime(arrivalTime);
  }
1364572
private boolean shouldReport(JCDiagnostic d) {
        JavaFileObject file = d.getSource();

        if (file == null)
            return true;

        if (!shouldReport(file, d.getIntPosition()))
            return false;

        if (!d.isFlagSet(DiagnosticFlag.SOURCE_LEVEL))
            return true;

        Pair<JavaFileObject, String> coords = new Pair<>(file, d.getCode());
        boolean shouldReport = !recordedSourceLevelErrors.contains(coords);
        if (shouldReport)
            recordedSourceLevelErrors.add(coords);
        return shouldReport;
    }
84461
def report(self, reporter, ignore_nfd=False, ignore_ws=False):
		
		if self.strip_errors and not ignore_ws:
			reporter.add(self.strip_errors, 'leading or trailing whitespace')

		if self.norm_errors and not ignore_nfd:
			reporter.add(self.norm_errors, 'not in Unicode NFD')
208970
def features_met?(builder, features)
      builder_features = builder.features
      features.all? do |feature|
        want_feature = true
        if feature =~ /^-(.*)$/
          want_feature = false
          feature = $1
        end
        builder_has_feature = builder_features.include?(feature)
        want_feature ? builder_has_feature : !builder_has_feature
      end
    end
1003791
protected boolean reportHeartBeat(DatanodeID node) {
    if (node != null && shouldUpdateNodes()) {
      reportRegister(node);
      synchronized(this) {
        if (outStandingHeartbeats.remove(node)) {
          outStandingReports.add(node);
          return true;
        }
      }
    }
    return false;
  }
3826
def do_build_reports(directory):
    
    for cwd, dirs, files in os.walk(directory):
        for f in sorted(files):
            if f in ('job.ini', 'job_h.ini', 'job_haz.ini', 'job_hazard.ini'):
                job_ini = os.path.join(cwd, f)
                logging.info(job_ini)
                try:
                    reportwriter.build_report(job_ini, cwd)
                except Exception as e:
                    logging.error(str(e))
767294
private void publishLrReports(@Nonnull Run<?, ?> build) throws IOException {
        File reportDirectory = new File(build.getRootDir(), PERFORMANCE_REPORT_FOLDER);
        if (reportDirectory.exists()) {
            File htmlIndexFile = new File(reportDirectory, INDEX_HTML_NAME);
            if (htmlIndexFile.exists()) {
                build.replaceAction(new PerformanceReportAction(build));
            }
        }

        File summaryDirectory = new File(build.getRootDir(), TRANSACTION_SUMMARY_FOLDER);
        if (summaryDirectory.exists()) {
            File htmlIndexFile = new File(summaryDirectory, INDEX_HTML_NAME);
            if (htmlIndexFile.exists()) {
                build.replaceAction(new TransactionSummaryAction(build));
            }
        }
    }
947119
def reporting(self):
        
        self.thread_debug("reporting")
        res = resource.getrusage(resource.RUSAGE_SELF)
        self.NOTIFY("",
                    type='internal-usage',
                    maxrss=round(res.ru_maxrss/1024, 2),
                    ixrss=round(res.ru_ixrss/1024, 2),
                    idrss=round(res.ru_idrss/1024, 2),
                    isrss=round(res.ru_isrss/1024, 2),
                    threads=threading.active_count(),
                    proctot=len(self.monitors),
                    procwin=self.stats.procwin)
523170
@Override
    public boolean canGenerateReport() {
        populateSettings();
        boolean isCapable = false;
        for (Artifact a : getProject().getArtifacts()) {
            if (!getArtifactScopeExcluded().passes(a.getScope())) {
                isCapable = true;
                break;
            }
        }
        return isCapable;
    }
662061
def _on_report(_loop, adapter, conn_id, report):
    """"""

    conn_string = None
    if conn_id is not None:
        conn_string = adapter._get_property(conn_id, 'connection_string')

    if isinstance(report, BroadcastReport):
        adapter.notify_event_nowait(conn_string, 'broadcast', report)
    elif conn_string is not None:
        adapter.notify_event_nowait(conn_string, 'report', report)
    else:
        adapter._logger.debug("Dropping report with unknown conn_id=%s", conn_id)
741248
def perfect_build
      is_perfect_build = @warning_count == 0 && @error_count == 0 && @test_failures_count == 0
      if post_messages
          message = Array.new
          message.push (@build_title) unless @build_title.nil?
          message.push ("Perfect build 👍🏻")
          message(message.reject(&:empty?).join(" ")) if is_perfect_build
      end
      return is_perfect_build
    end
778247
protected boolean shouldReport(JavaFileObject file, int pos) {
        if (file == null)
            return true;

        Pair<JavaFileObject,Integer> coords = new Pair<>(file, pos);
        boolean shouldReport = !recorded.contains(coords);
        if (shouldReport)
            recorded.add(coords);
        return shouldReport;
    }