// Report returns htlc reports for the active resolvers.
432222
func (c *ChannelArbitrator) Report() []*ContractReport {
	c.activeResolversLock.RLock()
	defer c.activeResolversLock.RUnlock()

	var reports []*ContractReport
	for _, resolver := range c.activeResolvers {
		r, ok := resolver.(reportingContractResolver)
		if !ok {
			continue
		}

		if r.IsResolved() {
			continue
		}

		report := r.report()
		if report == nil {
			continue
		}

		reports = append(reports, report)
	}

	return reports
}
742030
func (info *nginxInfos) Report() map[string]string {
	return map[string]string{
		"Shared listener port": strconv.Itoa(info.port),
	}
}
1183996
func (_m *ClientInterface) ReportHealthStatus(key health.HealthStatusKey, value health.HealthStatus, expires time.Duration) error {
	ret := _m.Called(key, value, expires)

	var r0 error
	if rf, ok := ret.Get(0).(func(health.HealthStatusKey, health.HealthStatus, time.Duration) error); ok {
		r0 = rf(key, value, expires)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}
384965
func (r *compositeReporter) Report(span *Span) {
	for _, reporter := range r.reporters {
		reporter.Report(span)
	}
}
1017682
func (ac *Context) Report() {
	account := ac.email
	if ac.anonymous {
		account = "anonymous"
	}
	logging.Infof(ac.ctx,
		"%q account is %s (git_auth: %v, devshell: %v, docker:%v, firebase: %v)",
		ac.ID, account, ac.EnableGitAuth, ac.EnableDevShell, ac.EnableDockerAuth, ac.EnableFirebaseAuth)
}
28773
func (r *InMemoryReporter) Report(span *Span) {
	r.lock.Lock()
	// Need to retain the span otherwise it will be released
	r.spans = append(r.spans, span.Retain())
	r.lock.Unlock()
}
1105031
func Report(ctx context.Context, err error) error {
	e := errors.New(ctx, err, 1)
	return reportWithLevel(ctx, DefaultLevel, e)
}
425732
func (m *Model) Report() map[string]interface{} {
	defer m.doLocked()()

	return map[string]interface{}{
		"name":              m.details.Owner + "/" + m.details.Name,
		"life":              m.details.Life,
		"application-count": len(m.applications),
		"charm-count":       len(m.charms),
		"machine-count":     len(m.machines),
		"unit-count":        len(m.units),
	}
}
1124040
func (r *Resolver) Resolve(qname, qtype string) RRs {
	rrs, err := r.ResolveErr(qname, qtype)
	if err == NXDOMAIN {
		return emptyRRs
	}
	if err != nil {
		return nil
	}
	return rrs
}
1010525
func (s *StatusReport) Report() *Report {
	rep := &Report{
		TokendVersion:  s.Version,
		ServiceVersion: s.ServiceVersion,
		StartedTS:      s.Started.Unix(),
		TotalDuration:  s.Finished.Sub(s.Started).Nanoseconds() / 1000,
		RPCDuration:    s.MintTokenDuration.Nanoseconds() / 1000,
		UpdateOutcome:  string(s.UpdateOutcome),
		UpdateReason:   string(s.UpdateReason),
	}
	if s.FailureError != nil {
		rep.FailureError = s.FailureError.Error()
	}
	if s.LastToken != nil {
		rep.TokenLastUpdateTS = s.LastToken.LastUpdate
		rep.TokenNextUpdateTS = s.LastToken.NextUpdate
		rep.TokenExpiryTS = s.LastToken.Expiry
	}
	return rep
}
1351914
func (p *StatePool) Report() map[string]interface{} {
	p.mu.Lock()
	report := make(map[string]interface{})
	report["txn-watcher"] = p.watcherRunner.Report()
	report["system"] = p.systemState.Report()
	report["pool-size"] = len(p.pool)
	for uuid, item := range p.pool {
		modelReport := item.state.Report()
		modelReport["ref-count"] = item.refCount()
		modelReport["to-remove"] = item.remove
		report[uuid] = modelReport
	}
	p.mu.Unlock()
	return report
}
902530
func (m *AgentPool) reportStats() {
	var logReport bool
	if m.cfg.Clock.Now().Sub(m.lastReport) > defaults.ReportingPeriod {
		m.lastReport = m.cfg.Clock.Now()
		logReport = true
	}

	for key, agents := range m.agents {
		m.Debugf("Outbound tunnel for %v connected to %v proxies.", key.tunnelID, len(agents))

		countPerState := map[string]int{
			agentStateConnecting:   0,
			agentStateDiscovering:  0,
			agentStateConnected:    0,
			agentStateDiscovered:   0,
			agentStateDisconnected: 0,
		}
		for _, a := range agents {
			countPerState[a.getState()]++
		}
		for state, count := range countPerState {
			gauge, err := trustedClustersStats.GetMetricWithLabelValues(key.tunnelID, state)
			if err != nil {
				m.Warningf("Failed to get gauge: %v.", err)
				continue
			}
			gauge.Set(float64(count))
		}
		if logReport {
			m.WithFields(log.Fields{"target": key.tunnelID, "stats": countPerState}).Info("Outbound tunnel stats.")
		}
	}
}
1186875
func (dr *StreamReporter) Report(key, value string, resultType ValidationResultType) error {
	var c color
	switch resultType {
	case good:
		c = green
	case bad:
		c = red
	case warn:
		c = yellow
	default:
		c = white
	}
	if dr.WriteStream == nil {
		return errors.New("WriteStream has to be defined for this reporter")
	}

	fmt.Fprintf(dr.WriteStream, "%s: %s\n", colorize(key, white), colorize(value, c))
	return nil
}
1094794
func (s *subscriber) Report() map[string]interface{} {
	s.mutex.Lock()
	defer s.mutex.Unlock()
	result := map[string]interface{}{
		"source": s.config.Origin,
	}
	targets := make(map[string]interface{})
	for target, remote := range s.servers {
		targets[target] = remote.Report()
	}
	if len(targets) > 0 {
		result["targets"] = targets
	}
	return result

}
1120615
func Report(c context.Context) {
	var stats runtime.MemStats
	runtime.ReadMemStats(&stats)

	MemAlloc.Set(c, int64(stats.Alloc))
	MemTotalAlloc.Set(c, int64(stats.TotalAlloc))
	MemMallocs.Set(c, int64(stats.Mallocs))
	MemFrees.Set(c, int64(stats.Frees))
	MemNextGC.Set(c, int64(stats.NextGC))
	MemNumGC.Set(c, int64(stats.NumGC))
	MemPauseTotal.Set(c, int64(stats.PauseTotalNs/1000))
	MemHeapSys.Set(c, int64(stats.HeapSys))
	MemHeapIdle.Set(c, int64(stats.HeapIdle))
	MemHeapInuse.Set(c, int64(stats.HeapInuse))
	MemHeapObjects.Set(c, int64(stats.HeapObjects))
	MemStackInuse.Set(c, int64(stats.StackInuse))
	MemStackSys.Set(c, int64(stats.StackSys))
	MemMSpanInuse.Set(c, int64(stats.MSpanInuse))
	MemMSpanSys.Set(c, int64(stats.MSpanSys))
	MemMCacheInuse.Set(c, int64(stats.MCacheInuse))
	MemMCacheSys.Set(c, int64(stats.MCacheSys))

	GoroutineNum.Set(c, int64(runtime.NumGoroutine()))
}
623858
func Report(req request.Request, zone, rcode string, size int, start time.Time) {
	// Proto and Family.
	net := req.Proto()
	fam := "1"
	if req.Family() == 2 {
		fam = "2"
	}

	typ := req.QType()

	RequestCount.WithLabelValues(zone, net, fam).Inc()
	RequestDuration.WithLabelValues(zone).Observe(float64(time.Since(start) / time.Millisecond))

	if req.Do() {
		RequestDo.WithLabelValues(zone).Inc()
	}

	if _, known := monitorType[typ]; known {
		RequestType.WithLabelValues(zone, dns.Type(typ).String()).Inc()
	} else {
		RequestType.WithLabelValues(zone, other).Inc()
	}

	ResponseSize.WithLabelValues(zone, net).Observe(float64(size))
	RequestSize.WithLabelValues(zone, net).Observe(float64(req.Len()))

	ResponseRcode.WithLabelValues(zone, rcode).Inc()
}
1318341
func (c *Client) Report(migrationId string, phase migration.Phase, success bool) error {
	args := params.MinionReport{
		MigrationId: migrationId,
		Phase:       phase.String(),
		Success:     success,
	}
	err := c.caller.FacadeCall("Report", args, nil)
	return errors.Trace(err)
}