Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

docs

  • Loading branch information...
commit 7a49717f51ab98f5268dda3b7df6bd5a61f4fe6d 1 parent 784043a
@petar authored
View
5 dccp/sandbox/INPROGRESS
@@ -1 +1,6 @@
+Produce setRate samples
+ Test logic append a "show" token to log arguments that pertain to this test and should be displayed in inspector output
+
+Reducer for actual rate
+
Should we send NON-data packets immediately, bypassing rate control?
View
9 dccp/sandbox/rate_test.go
@@ -11,7 +11,9 @@ import (
)
const (
- rateDuration = 10e9 // Duration of rate test
+ rateDuration = 10e9 // Duration of rate test
+ rateInterval = 1e9
+ ratePacketsPerInterval = 50
)
// TestRate tests whether a single connection's one-way client-to-server rate converges to
@@ -21,13 +23,16 @@ const (
// (2.a) either be closely below the connection limit,
// (2.b) or be closely above the connection limit (and maintain a drop rate below some threshold)
// A two-way test is not necessary as the congestion mechanisms in either direction are completely independent.
+//
+// NOTE: Pipe currently supports rate simulation in packets per time interval. If we want to test behavior
+// under variable packet sizes, we need to implement rate simulation in bytes per interval.
func TestRate(t *testing.T) {
run, _ := NewRuntime("rate")
clientConn, serverConn, clientToServer, _ := NewClientServerPipe(run)
// Set rate limit on client-to-server connection
- clientToServer.??
+ clientToServer.SetWriteRate(rateInterval, ratePacketsPerInterval)
cchan := make(chan int, 1)
mtu := clientConn.GetMTU()
View
2  dccp/sandbox/runrate.ssh
@@ -0,0 +1,2 @@
+#!/bin/sh
+go test -test.run=Rate; dccp-inspector -emits=true var/rate.emit > var/rate.html
View
29 doc/synthetic-time
@@ -8,3 +8,32 @@ These interactions would be one of:
return from blocking exchange with external environment
kill goroutine (can we capture these?)
spawn go-routine
+
+
+Example program for article:
+Say F is as follows:
+
+func F(api TimeAPI) (dur time.Duration) {
+ d := make(chan int)
+ c := make(chan time.Time)
+ go func() {
+ api.Sleep(2e9)
+ c <- api.Now()
+ d <- 1
+ }()
+ go func() {
+ api.Sleep(1e9)
+ c <- api.Now()
+ d <- 1
+ }()
+ go func() {
+ t0 := <-c
+ t1 := <-c
+ dur = t1.Sub(t0)
+ d <- 1
+ }()
+ <-d
+ <-d
+ <-d
+ return
+}
Please sign in to comment.
Something went wrong with that request. Please try again.