diff --git a/README.md b/README.md index fd9785a..16d8bde 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ abstract-stream-muxer ===================== +> **STILL WIP** + [![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) [![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) > A test suite and interface you can use to implement a stream muxer. diff --git a/package.json b/package.json index f4bbdab..e2713f6 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "homepage": "https://github.com/diasdavid/abstract-stream-muxer", "dependencies": { "dev-null": "^0.1.1", + "random-bytes-stream": "^0.1.0", "stream-pair": "^1.0.3" } } diff --git a/tests/stress-test.js b/tests/stress-test.js index 4870a5a..2f00837 100644 --- a/tests/stress-test.js +++ b/tests/stress-test.js @@ -1,9 +1,10 @@ var streamPair = require('stream-pair') var devNull = require('dev-null') +var bytesStream = require('random-bytes-stream') module.exports.all = function (test, common) { - test('1 stream with 10Mb file', function (t) { + test('1 stream with 64Mb file', function (t) { common.setup(test, function (err, Muxer) { t.ifError(err, 'should not throw') var pair = streamPair.create() @@ -17,6 +18,14 @@ function spawnGeneration (t, Muxer, dialerSocket, listenerSocket, nStreams, size } -function randSizeMsg (sizeWindow) { - return Math.floor(Math.random() * (sizeWindow[1] - sizeWindow[0] + 1)) + sizeWindow[0] -} +// function randSizeMsg (sizeWindow) { +// return Math.floor(Math.random() * (sizeWindow[1] - sizeWindow[0] + 1)) + sizeWindow[0] +// } + +// tests list: +// SubtestStress1Conn1Stream1Msg +// SubtestStress1Conn1Stream100Msg +// SubtestStress1Conn100Stream100Msg +// SubtestStress1Conn1000Stream10Msg +// SubtestStress1Conn1000Stream100Msg10MB +