// Failures returns the rolling number of failures
172901
func (d *DefaultMetricCollector) Failures() *rolling.Number {
	d.mutex.RLock()
	defer d.mutex.RUnlock()
	return d.failures
}
577605
func FailNowf(t TestingT, failureMessage string, msg string, args ...interface{}) {
	if h, ok := t.(tHelper); ok {
		h.Helper()
	}
	if assert.FailNowf(t, failureMessage, msg, args...) {
		return
	}
	t.FailNow()
}
605985
func (s *StartTaskOutput) SetFailures(v []*Failure) *StartTaskOutput {
	s.Failures = v
	return s
}
656089
func (e MultiError) NumErrors() int {
	if e.err == nil {
		return 0
	}
	return len(e.errors) + 1
}
316053
func (w *window) Successes() int64 {
	w.bucketLock.RLock()

	var successes int64
	w.buckets.Do(func(x interface{}) {
		b := x.(*bucket)
		successes += b.success
	})
	w.bucketLock.RUnlock()
	return successes
}
1082696
func (rs *retryingSink) failure() {
	rs.failures.recent++
	rs.failures.last = time.Now().UTC()
}
359983
func (cmd *CLI) failf(format string, a ...interface{}) error {
	err := fmt.Errorf(format, a...)
	fmt.Fprintln(cmd.ErrOutput(), err)
	fmt.Fprintln(cmd.ErrOutput(), "")
	cmd.Usage()
	return err
}
722370
func (s *JobDescriptor) SetFailureReasons(v []*JobFailure) *JobDescriptor {
	s.FailureReasons = v
	return s
}
1059192
func (lm *logMatcher) FailureMessage(actual interface{}) (message string) {
	return fmt.Sprintf(
		"Expected\n\t%s\nto contain log sequence \n\t%s",
		format.Object(lm.actual, 0),
		format.Object(lm.expected, 0),
	)
}
342089
func (dc *DeploymentController) getReplicaFailures(allRSs []*apps.ReplicaSet, newRS *apps.ReplicaSet) []apps.DeploymentCondition {
	var conditions []apps.DeploymentCondition
	if newRS != nil {
		for _, c := range newRS.Status.Conditions {
			if c.Type != apps.ReplicaSetReplicaFailure {
				continue
			}
			conditions = append(conditions, util.ReplicaSetToDeploymentCondition(c))
		}
	}

	// Return failures for the new replica set over failures from old replica sets.
	if len(conditions) > 0 {
		return conditions
	}

	for i := range allRSs {
		rs := allRSs[i]
		if rs == nil {
			continue
		}

		for _, c := range rs.Status.Conditions {
			if c.Type != apps.ReplicaSetReplicaFailure {
				continue
			}
			conditions = append(conditions, util.ReplicaSetToDeploymentCondition(c))
		}
	}
	return conditions
}
956453
func (example *Example) Failed(message string) {
	example.Root().T.Fail()
	example.HasFailure = true
	example.Formatter.Failed(example, message)
}
1190245
func Retry(err error, message string, args ...interface{}) error {
	return WrapWithMessage(&RetryError{
		Message: fmt.Sprintf(message, args...),
		Err:     err,
	}, message, args...)
}
201561
func (s *RunTaskOutput) SetFailures(v []*Failure) *RunTaskOutput {
	s.Failures = v
	return s
}
66175
func (r *runner) fail(qr QueuedRun, runLogger *zap.Logger, stage string, reason error) {
	if err := r.taskControlService.AddRunLog(r.ts.authCtx, r.task.ID, qr.RunID, time.Now(), stage+": "+reason.Error()); err != nil {
		runLogger.Info("Failed to update run log", zap.Error(err))
	}

	r.updateRunState(qr, RunFail, runLogger)
	atomic.StoreUint32(r.state, runnerIdle)
}
268019
func (s *DescribeContainerInstancesOutput) SetFailures(v []*Failure) *DescribeContainerInstancesOutput {
	s.Failures = v
	return s
}
20134
func (d *DefaultMetricCollector) Successes() *rolling.Number {
	d.mutex.RLock()
	defer d.mutex.RUnlock()
	return d.successes
}
216152
func (resp *Response) Fail(msg ...interface{}) *Response {
	resp.assertion.True(resp.resp.StatusCode >= 400, msg...)

	return resp
}