func (e *EndpointStats) AverageChangedMetrics() float64 {
	if e.ChangedMetricsCount == 0 {
		return 0.0
	}
	return float64(e.ChangedMetricsSum) / float64(e.ChangedMetricsCount)
}
AverageChangedMetrics is a convenience routine that returns the average
number of changing metrics.
package application
import (
	"github.com/Symantec/scotty"
	"github.com/Symantec/scotty/hostid"
	"github.com/Symantec/scotty/namesandports"
	"time"
)
const (
	HealthAgentName = "health agent"
	HealthAgentPort = 6910
)
type EndpointStats struct {
	LastReadTime time.Time
	PollTime time.Duration
	LastError     error
	LastErrorTime time.Time
	InitialMetricCount uint64
	Down bool
	ChangedMetricsSum   uint64
	ChangedMetricsCount uint64
	Status scotty.Status
}
func (e *EndpointStats) Staleness() time.Duration {
	if e.LastReadTime.IsZero() {
		return 0
	}
	return time.Now().Sub(e.LastReadTime)
}