This commit is contained in:
xtaci
2020-10-09 15:18:00 +08:00
parent a08b274651
commit ff34f7683f
3 changed files with 3 additions and 2 deletions
+1
View File
@@ -110,6 +110,7 @@ func (dec *fecDecoder) decode(in fecPacket) (recovered [][]byte) {
dec.codec = codec
dec.decodeCache = make([][]byte, dec.shardSize)
dec.flagCache = make([]bool, dec.shardSize)
//log.Println("autotune to :", dec.dataShards, dec.parityShards)
}
}
+1 -1
View File
@@ -10,7 +10,7 @@ func BenchmarkFECDecode(b *testing.B) {
const dataSize = 10
const paritySize = 3
const payLoad = 1500
decoder := newFECDecoder(1024, dataSize, paritySize)
decoder := newFECDecoder(dataSize, paritySize)
b.ReportAllocs()
b.SetBytes(payLoad)
for i := 0; i < b.N; i++ {
+1 -1
View File
@@ -34,7 +34,7 @@ func dialEcho(port int) (*UDPSession, error) {
//block, _ := NewTEABlockCrypt(pass[:16])
//block, _ := NewAESBlockCrypt(pass)
block, _ := NewSalsa20BlockCrypt(pass)
sess, err := DialWithOptions(fmt.Sprintf("127.0.0.1:%v", port), block, 10, 3)
sess, err := DialWithOptions(fmt.Sprintf("127.0.0.1:%v", port), block, 10, 1)
if err != nil {
panic(err)
}