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:
Michael Taufen
2016-09-06 15:31:07 -07:00
parent 943d7aa5aa
commit b9f0bd959e
2 changed files with 188 additions and 127 deletions

View File

@@ -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
}