Доработать инструменты экспериментов: чередовать повторы, останавливать лестницу на первой проваленной ступени, задавать maxconn и CPU базы в сериях, записывать замер скорости хоста и контроль шума, сократить комментарии

This commit is contained in:
2026-11-04 12:39:04 +03:00
parent ce47c138e4
commit baa5995938
24 changed files with 253 additions and 240 deletions
+3 -8
View File
@@ -6,14 +6,9 @@ import (
"time"
)
// openLoop offers requests at a constant rate for d, whatever the response
// times: request i is planned at start + i/rate and sent then, or at once if
// the generator is already late. Waiting for responses before sending more
// (a closed loop) would let a slow system lower its own load and hide its
// latency: coordinated omission. next runs on the scheduling goroutine, so it
// may use non-thread-safe state such as the random source; the job it
// returns runs on a goroutine of its own. openLoop returns once every job
// has finished.
// openLoop sends request i at start + i/rate whatever the response times: a
// closed loop would let a slow system lower its own load and hide its latency
// (coordinated omission). It returns once every job has finished.
func openLoop(ctx context.Context, rate float64, d time.Duration, next func(planned time.Time) func()) {
n := int(rate * d.Seconds())
interval := time.Duration(float64(time.Second) / rate)