Mult Port + TCP Calibration (SSH DEAD)
This commit is contained in:
@@ -26,14 +26,25 @@ const (
|
||||
StatusWait byte = 3
|
||||
StatusEOF byte = 4
|
||||
|
||||
ProbeUpload byte = 1
|
||||
ProbeDownload byte = 2
|
||||
ProbeKeepalive byte = 3
|
||||
ProbeBatch byte = 4
|
||||
ProbeUpload byte = 1
|
||||
ProbeDownload byte = 2
|
||||
ProbeKeepalive byte = 3
|
||||
ProbeBatch byte = 4
|
||||
ProbeIperfUpload byte = 5
|
||||
ProbeIperfDownload byte = 6
|
||||
)
|
||||
|
||||
var ProbeMagic = [4]byte{'D', 'T', 'P', '2'}
|
||||
|
||||
// ProbeBurstCount is deliberately fixed at one. Startup calibration measures
|
||||
// the safe record size of a single DragonTCP lane, not aggregate throughput.
|
||||
// Multiple outstanding calibration records can make a constrained carrier look
|
||||
// artificially better or worse and can produce a false ceiling. Confirmation
|
||||
// retries are performed sequentially on fresh connections by the client.
|
||||
func ProbeBurstCount(chunk int) int {
|
||||
return 1
|
||||
}
|
||||
|
||||
type SessionID [16]byte
|
||||
|
||||
type Request struct {
|
||||
|
||||
@@ -103,3 +103,11 @@ func BenchmarkWriteRequest1MiB(b *testing.B) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestProbeBurstCountSinglePoller(t *testing.T) {
|
||||
for _, chunk := range []int{0, 1, 1024, 128 * 1024, 512 * 1024, 1024 * 1024} {
|
||||
if got := ProbeBurstCount(chunk); got != 1 {
|
||||
t.Fatalf("ProbeBurstCount(%d)=%d, want 1", chunk, got)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user