// Report returns information that is used in the dependency engine report.
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),
	}
}
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)
}
1064060
func reportCompliance(rctype clientType, mmap map[string]string, specms []string) {
	fmt.Printf("=== compliance report [%s] =========================\n", rctype)
	var nccnt = 0
	for _, method := range specms {
		if mmap[method] == "" {
			nccnt++
			fmt.Printf("not defined - [%d]: %s\n", nccnt, method)
		}
	}
	if nccnt == 0 {
		fmt.Printf("client is compliant")
	}
}
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

}
1219193
func (h *LogReporter) ReportWithLevel(ctx context.Context, level string, err error) error {
	var file, line string
	var stack errors.StackTrace

	if errWithStack, ok := err.(stackTracer); ok {
		stack = errWithStack.StackTrace()
	}
	if stack != nil && len(stack) > 0 {
		file = fmt.Sprintf("%s", stack[0])
		line = fmt.Sprintf("%d", stack[0])
	} else {
		file = "unknown"
		line = "0"
	}

	if level == "debug" {
		logger.Debug(ctx, "", "debug", fmt.Sprintf(`"%v"`, err), "line", line, "file", file)
	} else if level == "info" {
		logger.Info(ctx, "", "info", fmt.Sprintf(`"%v"`, err), "line", line, "file", file)
	} else {
		logger.Error(ctx, "", level, fmt.Sprintf(`"%v"`, err), "line", line, "file", file)
	}
	return nil
}
305748
func Report(ug *pb.Usage) error {
	if v := os.Getenv("MICRO_REPORT_USAGE"); v == "false" {
		return nil
	}

	// update timestamp/window
	now := uint64(time.Now().UnixNano())
	ug.Window = now - ug.Timestamp
	ug.Timestamp = now

	p, err := proto.Marshal(ug)
	if err != nil {
		return err
	}
	req, err := http.NewRequest("POST", u, bytes.NewReader(p))
	if err != nil {
		return err
	}
	req.Header.Set("Content-Type", "application/protobuf")
	req.Header.Set("User-Agent", a)
	rsp, err := http.DefaultClient.Do(req)
	if err != nil {
		return err
	}
	defer rsp.Body.Close()
	io.Copy(ioutil.Discard, rsp.Body)
	return nil
}
424748
func (f *Facade) ReportInstanceDead(serviceID string, instanceID int) {
	f.hcache.DeleteInstance(serviceID, instanceID)
}
684126
func (r *ReportingTimerReal) Report(prefix string) {
	dur := r.Stop()
	r.Reset()
	r.G().Log.Info("timer: %s [%d ms]", prefix, dur/time.Millisecond)
}
264117
func (t *migrateTracker) report(prefix string, info *resource.Info, err error) {
	ns := info.Namespace
	if len(ns) > 0 {
		ns = " -n " + ns
	}
	groupResource := info.Mapping.Resource.GroupResource()
	groupResourceStr := (&groupResource).String()
	if err != nil {
		fmt.Fprintf(t.out, "E%s %-10s%s %s/%s: %v\n", timeStampNow(), prefix, ns, groupResourceStr, info.Name, err)
	} else {
		fmt.Fprintf(t.out, "I%s %-10s%s %s/%s\n", timeStampNow(), prefix, ns, groupResourceStr, info.Name)
	}
}
226007
func (c *Context) Report(err error, data Data) error {
	if rErr, ok := err.(reportableError); ok {
		if rErr.Reportable() == false {
			return nil
		}
	}

	dataMaps := make([]Data, 1, 3)
	dataMaps[0] = c.Data()
	if gErr, ok := err.(grohlError); ok {
		if errData := gErr.Data(); errData != nil {
			dataMaps = append(dataMaps, errData)
		}
	}

	if data != nil {
		dataMaps = append(dataMaps, data)
	}

	merged := dupeMaps(dataMaps...)
	errorToMap(err, merged)

	if c.ErrorReporter != nil {
		return c.ErrorReporter.Report(err, merged)
	} else {
		var logErr error
		logErr = c.log(merged)
		if logErr != nil {
			return logErr
		}

		for _, line := range ErrorBacktraceLines(err) {
			lineData := dupeMaps(merged)
			lineData["site"] = line
			logErr = c.log(lineData)
			if logErr != nil {
				return logErr
			}
		}
		return nil
	}
}
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()))
}
122615
func (info *dashboardInfos) Report() map[string]string {
	return map[string]string{
		"Website address":       info.host,
		"Website listener port": strconv.Itoa(info.port),
		"Ethstats service":      info.ethstats,
		"Explorer service":      info.explorer,
		"Wallet service":        info.wallet,
		"Faucet service":        info.faucet,
	}
}
1185992
func (c context) ReportAction(actionResponse updater.UpdatePromptResponse, update *updater.Update, options updater.UpdateOptions) {
	if err := c.reportAction(actionResponse, update, options, defaultEndpoints.action, time.Minute); err != nil {
		c.log.Warningf("Error notifying about an action (%s): %s", actionResponse.Action, err)
	}
}
1357021
func (info *ethstatsInfos) Report() map[string]string {
	return map[string]string{
		"Website address":       info.host,
		"Website listener port": strconv.Itoa(info.port),
		"Login secret":          info.secret,
		"Banned addresses":      strings.Join(info.banned, "\n"),
	}
}
980481
func (w *Worker) Report() map[string]interface{} {
	w.mu.Lock()
	result := map[string]interface{}{
		"api-port": w.config.APIPort,
		"status":   w.status,
		"ports":    w.holdable.report(),
	}
	if w.config.ControllerAPIPort != 0 {
		result["api-port-open-delay"] = w.config.APIPortOpenDelay
		result["controller-api-port"] = w.config.ControllerAPIPort
	}
	w.mu.Unlock()
	return result
}
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
}
384965
func (r *compositeReporter) Report(span *Span) {
	for _, reporter := range r.reporters {
		reporter.Report(span)
	}
}