[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [flashproxy/master] Allow ratelimit=off.



commit cc318101d94589b4456bf2722086614579374f48
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Wed Nov 16 05:03:35 2011 -0800

    Allow ratelimit=off.
---
 experiments/switching/local-http-alternating.sh |    2 +-
 experiments/switching/local-http-constant.sh    |    2 +-
 experiments/switching/remote-tor-alternating.sh |    2 +-
 experiments/switching/remote-tor-constant.sh    |    2 +-
 experiments/throughput/throughput.sh            |    2 +-
 swfcat.as                                       |   12 ++++++++----
 6 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/experiments/switching/local-http-alternating.sh b/experiments/switching/local-http-alternating.sh
index 8b3bf91..696f1d5 100755
--- a/experiments/switching/local-http-alternating.sh
+++ b/experiments/switching/local-http-alternating.sh
@@ -9,7 +9,7 @@
 
 PROFILE_1=flashexp1
 PROFILE_2=flashexp2
-PROXY_URL="http://127.0.0.1:8000/swfcat.swf?facilitator=127.0.0.1:9002";
+PROXY_URL="http://127.0.0.1:8000/swfcat.swf?facilitator=127.0.0.1:9002&ratelimit=off";
 DATA_FILE_NAME="$FLASHPROXY_DIR/dump"
 OUTPUT_FILENAME="$1"
 
diff --git a/experiments/switching/local-http-constant.sh b/experiments/switching/local-http-constant.sh
index bcc65c8..c1a52f8 100755
--- a/experiments/switching/local-http-constant.sh
+++ b/experiments/switching/local-http-constant.sh
@@ -9,7 +9,7 @@
 
 PROFILE_1=flashexp1
 PROFILE_2=flashexp2
-PROXY_URL="http://127.0.0.1:8000/swfcat.swf?facilitator=127.0.0.1:9002";
+PROXY_URL="http://127.0.0.1:8000/swfcat.swf?facilitator=127.0.0.1:9002&ratelimit=off";
 DATA_FILE_NAME="$FLASHPROXY_DIR/dump"
 OUTPUT_FILENAME="$1"
 
diff --git a/experiments/switching/remote-tor-alternating.sh b/experiments/switching/remote-tor-alternating.sh
index a9c394d..26070d9 100755
--- a/experiments/switching/remote-tor-alternating.sh
+++ b/experiments/switching/remote-tor-alternating.sh
@@ -9,7 +9,7 @@
 
 PROFILE_1=flashexp1
 PROFILE_2=flashexp2
-PROXY_URL="http://127.0.0.1:8000/swfcat.swf?facilitator=127.0.0.1:9002";
+PROXY_URL="http://127.0.0.1:8000/swfcat.swf?facilitator=127.0.0.1:9002&ratelimit=off";
 DATA_FILE_NAME="$FLASHPROXY_DIR/dump"
 OUTPUT_FILENAME="$1"
 
diff --git a/experiments/switching/remote-tor-constant.sh b/experiments/switching/remote-tor-constant.sh
index c1f1a82..939aef9 100755
--- a/experiments/switching/remote-tor-constant.sh
+++ b/experiments/switching/remote-tor-constant.sh
@@ -9,7 +9,7 @@
 
 PROFILE_1=flashexp1
 PROFILE_2=flashexp2
-PROXY_URL="http://127.0.0.1:8000/swfcat.swf?facilitator=127.0.0.1:9002";
+PROXY_URL="http://127.0.0.1:8000/swfcat.swf?facilitator=127.0.0.1:9002&ratelimit=off";
 DATA_FILE_NAME="$FLASHPROXY_DIR/dump"
 OUTPUT_FILENAME="$1"
 
diff --git a/experiments/throughput/throughput.sh b/experiments/throughput/throughput.sh
index 02939b1..672f2ac 100755
--- a/experiments/throughput/throughput.sh
+++ b/experiments/throughput/throughput.sh
@@ -19,7 +19,7 @@ while getopts "n:" OPTNAME; do
 done
 
 PROFILE=flashexp1
-PROXY_URL="http://127.0.0.1:8000/swfcat.swf?facilitator=127.0.0.1:9002&max_clients=$NUM_CLIENTS&facilitator_poll_interval=1.0";
+PROXY_URL="http://127.0.0.1:8000/swfcat.swf?facilitator=127.0.0.1:9002&max_clients=$NUM_CLIENTS&ratelimit=off&facilitator_poll_interval=1.0";
 DATA_FILE_NAME="$FLASHPROXY_DIR/dump"
 RESULTS_FILE_NAME="results-$NUM_CLIENTS-$(date --iso)"
 
diff --git a/swfcat.as b/swfcat.as
index 478b97c..76b35c4 100644
--- a/swfcat.as
+++ b/swfcat.as
@@ -25,9 +25,10 @@
  * How often to poll the facilitator, in seconds. The default is
  * DEFAULT_FACILITATOR_POLL_INTERVAL. There is a sanity-check minimum of 1.0 s.
  * 
- * ratelimit=<FLOAT>(<UNIT>)?
- * What rate to limit all proxy traffic combined to. The default is
- * DEFAULT_RATE_LIMIT. There is a sanity-check minimum of "10K".
+ * ratelimit=<FLOAT>(<UNIT>)?|off
+ * What rate to limit all proxy traffic combined to. The special value "off"
+ * disables the limit. The default is DEFAULT_RATE_LIMIT. There is a
+ * sanity-check minimum of "10K".
  *
  * client=1
  * If set (to any value), run in client RTMFP mode. In this mode, rather than
@@ -166,7 +167,10 @@ package
             }
             facilitator_poll_interval = Number(tmp);
 
-            tmp = get_param_byte_count("ratelimit", DEFAULT_RATE_LIMIT);
+            if (this.loaderInfo.parameters["ratelimit"] == "off")
+                tmp = undefined;
+            else
+                tmp = get_param_byte_count("ratelimit", DEFAULT_RATE_LIMIT);
             if (tmp === undefined) {
                 /* No rate limit. */
             } else if (tmp == null || tmp < MIN_FACILITATOR_POLL_INTERVAL) {



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits