Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2013-02-12 10:08:25 +0400
committerisaacs <i@izs.me>2013-02-20 02:14:30 +0400
commit051c1317f99ede15a831d1f542bd89a47ab77397 (patch)
tree034b3106137a6bc8d2bbf42c62f725eee21d6fda /benchmark
parente82f97401f9d7c54155b52b310f1893e45205c46 (diff)
bench: Remove throughput (covered by benchmark/net)
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/throughput-child.js24
-rw-r--r--benchmark/throughput.js21
2 files changed, 0 insertions, 45 deletions
diff --git a/benchmark/throughput-child.js b/benchmark/throughput-child.js
deleted file mode 100644
index 260b2807ded..00000000000
--- a/benchmark/throughput-child.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var net = require('net');
-var received = 0;
-var start = process.hrtime();
-var socket = net.connect(8000);
-
-socket.on('data', function(d) {
- received += d.length;
-});
-
-var interval = setInterval(function() {
- // After 1 gigabyte shutdown.
- if (received > 10 * 1024 * 1024 * 1024) {
- socket.destroy();
- clearInterval(interval);
- process.exit(0);
- } else {
- // Otherwise print some stats.
- var elapsed = process.hrtime(start);
- var sec = elapsed[0] + elapsed[1]/1E9;
- var gigabytes = received / (1024 * 1024 * 1024);
- var gigabits = gigabytes * 8.0;
- console.log((gigabits / sec) + " gbit/sec")
- }
-}, 1000);
diff --git a/benchmark/throughput.js b/benchmark/throughput.js
deleted file mode 100644
index a1ff1b653e8..00000000000
--- a/benchmark/throughput.js
+++ /dev/null
@@ -1,21 +0,0 @@
-var fork = require('child_process').fork;
-var net = require('net');
-var buffer = new Buffer(1024 * 1024);
-
-function write(socket) {
- if (!socket.writable) return;
-
- socket.write(buffer, function() {
- write(socket);
- });
-}
-
-var server = net.createServer(function(socket) {
- server.close();
- write(socket);
-});
-
-server.listen(8000, function() {
- fork(__dirname + '/throughput-child.js');
-});
-