kubernetes: k8s.io/kubernetes/test/e2e/framework/timer Index | Files

package timer

import "k8s.io/kubernetes/test/e2e/framework/timer"


Package Files


type Phase Uses

type Phase struct {
    // contains filtered or unexported fields

Phase represents a phase of a test. Phases can overlap.

func (*Phase) End Uses

func (phase *Phase) End()

End marks the phase as ended, unless it had already been ended before.

type TestPhaseTimer Uses

type TestPhaseTimer struct {
    // contains filtered or unexported fields

A TestPhaseTimer groups phases and provides a way to export their measurements as JSON or human-readable text. It is safe to use concurrently.

func NewTestPhaseTimer Uses

func NewTestPhaseTimer() *TestPhaseTimer

NewTestPhaseTimer creates a new TestPhaseTimer.

func (*TestPhaseTimer) PrintHumanReadable Uses

func (timer *TestPhaseTimer) PrintHumanReadable() string

PrintHumanReadable returns durations of all phases.

func (*TestPhaseTimer) PrintJSON Uses

func (timer *TestPhaseTimer) PrintJSON() string

PrintJSON returns durations of all phases with JSON format.

func (*TestPhaseTimer) StartPhase Uses

func (timer *TestPhaseTimer) StartPhase(sequenceNumber int, phaseName string) *Phase

StartPhase starts a new phase. sequenceNumber is an integer prepended to phaseName in the output, such that lexicographic sorting of phases in perfdash reconstructs the order of execution. Unfortunately it needs to be provided manually, since a simple incrementing counter would have the effect that inserting a new phase would renumber subsequent phases, breaking the continuity of historical records.

func (*TestPhaseTimer) SummaryKind Uses

func (timer *TestPhaseTimer) SummaryKind() string

SummaryKind returns the summary of test summary.

Package timer imports 6 packages (graph) and is imported by 36 packages. Updated 2019-11-13. Refresh now. Tools for package owners.