mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-29 21:01:02 +00:00
Log the following items in memory eviction test:
- memory working set - pressure condition - events for the default and test namespaces, after the test completes
This commit is contained in:
@@ -42,6 +42,7 @@ import (
|
||||
"text/tabwriter"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_4"
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
apierrs "k8s.io/kubernetes/pkg/api/errors"
|
||||
@@ -5160,3 +5161,14 @@ func CreateFileForGoBinData(gobindataPath, outputFilename string) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func ListNamespaceEvents(c *client.Client, ns string) error {
|
||||
ls, err := c.Events(ns).List(api.ListOptions{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, event := range ls.Items {
|
||||
glog.Infof("Event(%#v): type: '%v' reason: '%v' %v", event.InvolvedObject, event.Type, event.Reason, event.Message)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user