Optimize etcd storage by compressing recurring events in to a single event

This commit is contained in:
saadali
2015-02-10 16:49:32 -08:00
parent 52bf48cac2
commit 033577efa2
8 changed files with 535 additions and 38 deletions

View File

@@ -318,10 +318,12 @@ func describeEvents(el *api.EventList, w io.Writer) {
return
}
sort.Sort(SortableEvents(el.Items))
fmt.Fprint(w, "Events:\nTime\tFrom\tSubobjectPath\tReason\tMessage\n")
fmt.Fprint(w, "Events:\nFirstSeen\tLastSeen\tCount\tFrom\tSubobjectPath\tReason\tMessage\n")
for _, e := range el.Items {
fmt.Fprintf(w, "%s\t%v\t%v\t%v\t%v\n",
fmt.Fprintf(w, "%s\t%s\t%d\t%v\t%v\t%v\t%v\n",
e.FirstTimestamp.Time.Format(time.RFC1123Z),
e.LastTimestamp.Time.Format(time.RFC1123Z),
e.Count,
e.Source,
e.InvolvedObject.FieldPath,
e.Reason,