Skip to content

Add more timing information about clean state preparation in e2e tests #20967

@andrii-korotkov-verkada

Description

Summary

Right now the only reported timing info is for shell commands as well as total. The former is about 300-400ms, while the total can be 1.1-1.4sec. It would be great to get more details about various steps time to find targets to optimize.

Screenshot 2024-11-26 at 8 49 08 PM

Motivation

Preparing a clean state takes 10-30% of each e2e test runtime, so finding optimization opportunities can significantly help with the runtime.

Proposal

Use a code like

ts := stats.NewTimingStats()
...
ts.AddCheckpoint("some_step_ms")
...
for k, v := range ts.Timings() {
	fmt.Printf("%s: %d\n", k, v.Milliseconds())
}

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions