You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/config/config.go
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -322,6 +322,8 @@ type BrowserConfig struct {
322
322
// ReadinessTimeout is the maximum time to wait for the web-page to become ready (i.e. no longer loading anything).
323
323
ReadinessTimeout time.Duration
324
324
ReadinessIterationInterval time.Duration
325
+
// ReadinessWaitForNQueryCycles is the number of readiness checks that must pass consecutively before considering the page ready. This handles the case where queries drop to 0 briefly before incrementing again.
326
+
ReadinessWaitForNQueryCyclesint
325
327
// ReadinessPriorWait is the time to wait before checking for how ready the page is.
326
328
// This lets you force the webpage to take a beat and just do its thing before the service starts looking for whether it's time to render anything.
Usage: "The number of readiness checks that must pass consecutively before considering the page ready.",
455
+
Value: 1,
456
+
Validator: func(iint) error {
457
+
ifi<1 {
458
+
returnfmt.Errorf("browser readiness wait-for-n-query-cycles must be at least 1 (got %d)", i)
459
+
}
460
+
returnnil
461
+
},
462
+
},
450
463
&cli.DurationFlag{
451
464
Name: "browser.readiness.prior-wait",
452
465
Usage: "The time to wait before checking for how ready the page is. This lets you force the webpage to take a beat and just do its thing before the service starts looking for whether it's time to render anything. If <= 0, this is disabled.",
span.AddEvent("waiting for more successful readiness cycles", trace.WithAttributes(attribute.Int("currentCycle", numSuccessfulCycles), attribute.Int("requiredCycles", cfg.ReadinessWaitForNQueryCycles)))
0 commit comments