still WIP notice

This commit is contained in:
David Dias 2015-07-11 21:10:09 -07:00
parent 43e6ccf0f6
commit e46a24055c
3 changed files with 16 additions and 4 deletions

View File

@ -1,6 +1,8 @@
abstract-stream-muxer 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) [![](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. > A test suite and interface you can use to implement a stream muxer.

View File

@ -27,6 +27,7 @@
"homepage": "https://github.com/diasdavid/abstract-stream-muxer", "homepage": "https://github.com/diasdavid/abstract-stream-muxer",
"dependencies": { "dependencies": {
"dev-null": "^0.1.1", "dev-null": "^0.1.1",
"random-bytes-stream": "^0.1.0",
"stream-pair": "^1.0.3" "stream-pair": "^1.0.3"
} }
} }

View File

@ -1,9 +1,10 @@
var streamPair = require('stream-pair') var streamPair = require('stream-pair')
var devNull = require('dev-null') var devNull = require('dev-null')
var bytesStream = require('random-bytes-stream')
module.exports.all = function (test, common) { 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) { common.setup(test, function (err, Muxer) {
t.ifError(err, 'should not throw') t.ifError(err, 'should not throw')
var pair = streamPair.create() var pair = streamPair.create()
@ -17,6 +18,14 @@ function spawnGeneration (t, Muxer, dialerSocket, listenerSocket, nStreams, size
} }
function randSizeMsg (sizeWindow) { // function randSizeMsg (sizeWindow) {
return Math.floor(Math.random() * (sizeWindow[1] - sizeWindow[0] + 1)) + sizeWindow[0] // return Math.floor(Math.random() * (sizeWindow[1] - sizeWindow[0] + 1)) + sizeWindow[0]
} // }
// tests list:
// SubtestStress1Conn1Stream1Msg
// SubtestStress1Conn1Stream100Msg
// SubtestStress1Conn100Stream100Msg
// SubtestStress1Conn1000Stream10Msg
// SubtestStress1Conn1000Stream100Msg10MB