Skip to content

Measure watch stats in robustness tests like traffic stats #20487

@serathius

Description

@serathius

What would you like to be added?

Like for KV values:

func CalculateStats(reports []report.ClientReport, start, end time.Duration) (ts trafficStats) {
ts.Period = end - start
for _, r := range reports {
for _, op := range r.KeyValue {
if op.Call < start.Nanoseconds() || op.Call > end.Nanoseconds() {
continue
}
resp := op.Output.(model.MaybeEtcdResponse)
if resp.Error == "" {
ts.Successes++
} else {
ts.Failures++
}
}
}
return ts
}
type trafficStats struct {
Successes, Failures int
Period time.Duration
}
func (ts *trafficStats) SuccessRate() float64 {
return float64(ts.Successes) / float64(ts.Successes+ts.Failures)
}
func (ts *trafficStats) QPS() float64 {
return float64(ts.Successes) / ts.Period.Seconds()
}

Expect this is a separate structure. No need to measure values against failpoint injection like we do for KV.

Measure for watch:

  • Number of watch requests
  • Number of events collected
  • Number of progress notifies
  • Number of watch requests that were immediately closed
  • Coverage of revisions
  • Average duration of watch

Maybe propose some validation based on metrics

/cc @nwnt @joshjms

Why is this needed?

Have some quality quantifier for watch like we have for KV operations.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions