Documentation ¶
Index ¶
- Constants
- func AfterEach(ctx context.Context)
- func BeforeEach(ctx context.Context, config *rest.Config, kubeClient client.Client)
- func PrintTestTimes(times map[string][]TimeInterval) map[string][][]string
- func WriteTimestamps(outputDir string, timestamps *TimeIntervalCollector) error
- type EventClient
- type Monitor
- type NodeClaimController
- type NodeController
- type PodController
- type TimeInterval
- type TimeIntervalCollector
Constants ¶
const ( StageE2E = "E2E" StageBeforeEach = "BeforeEach" StageAfterEach = "AfterEach" )
const ( NoWatch = "NoWatch" NoEvents = "NoEvents" )
Variables ¶
This section is empty.
Functions ¶
func BeforeEach ¶
func PrintTestTimes ¶
func PrintTestTimes(times map[string][]TimeInterval) map[string][][]string
PrintTestTimes returns a list of tables. Each table has a list of Timestamps, where each timestamp is a list of strings.
func WriteTimestamps ¶
func WriteTimestamps(outputDir string, timestamps *TimeIntervalCollector) error
WriteTimestamps will create a temp directory and a .csv file for each suite test If the OUTPUT_DIR environment variable is set, we'll print the csvs to that directory.
Types ¶
type EventClient ¶
type EventClient struct {
// contains filtered or unexported fields
}
func NewEventClient ¶
func NewEventClient(kubeClient client.Client) *EventClient
func (*EventClient) DumpEvents ¶
func (c *EventClient) DumpEvents(ctx context.Context) error
type NodeClaimController ¶
type NodeClaimController struct {
// contains filtered or unexported fields
}
func NewNodeClaimController ¶
func NewNodeClaimController(kubeClient client.Client) *NodeClaimController
func (*NodeClaimController) GetInfo ¶
func (c *NodeClaimController) GetInfo(nc *v1.NodeClaim) string
type NodeController ¶
type NodeController struct {
// contains filtered or unexported fields
}
func NewNodeController ¶
func NewNodeController(kubeClient client.Client) *NodeController
type PodController ¶
type PodController struct {
// contains filtered or unexported fields
}
func NewPodController ¶
func NewPodController(kubeClient client.Client) *PodController
type TimeInterval ¶
func (TimeInterval) String ¶
func (t TimeInterval) String() []string
type TimeIntervalCollector ¶
type TimeIntervalCollector struct { // used for ordering on Collect Stages []string // contains filtered or unexported fields }
func NewTimestampCollector ¶
func NewTimestampCollector() *TimeIntervalCollector
func (*TimeIntervalCollector) End ¶
func (t *TimeIntervalCollector) End(stage string)
End will mark the interval's end time. If there is no End associated with a Start, the interval's inferred End is at the start of the AfterEach.
func (*TimeIntervalCollector) Finalize ¶
func (t *TimeIntervalCollector) Finalize()
Finalize will automatically add End time entries for Start entries without a corresponding set End. This is useful for when the test fails, since deferring time recording is tough to do.
func (*TimeIntervalCollector) Record ¶
func (t *TimeIntervalCollector) Record(name string)
Record adds the current starts/ends/stages as a list of time intervals, and adds it to the existingTimestamps, then resets the starts/ends/stages.
func (*TimeIntervalCollector) Reset ¶
func (t *TimeIntervalCollector) Reset()