mirror of
https://github.com/fluencelabs/js-libp2p-interfaces
synced 2025-04-24 18:02:28 +00:00
still WIP notice
This commit is contained in:
parent
43e6ccf0f6
commit
e46a24055c
@ -1,6 +1,8 @@
|
||||
abstract-stream-muxer
|
||||
=====================
|
||||
|
||||
> **STILL WIP**
|
||||
|
||||
[](http://ipn.io) [](http://webchat.freenode.net/?channels=%23ipfs)
|
||||
|
||||
> A test suite and interface you can use to implement a stream muxer.
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user