Tweak send/recv rates for performance test

This commit is contained in:
Jae Kwon 2015-12-09 13:53:50 -08:00
parent 4347b91b89
commit 8b308c1c08
1 changed files with 3 additions and 3 deletions

View File

@ -22,8 +22,8 @@ const (
idleTimeoutMinutes = 5
updateStatsSeconds = 2
pingTimeoutSeconds = 40
defaultSendRate = 51200 // 50KB/s
defaultRecvRate = 51200 // 50KB/s
defaultSendRate = 512000 // 500KB/s
defaultRecvRate = 512000 // 500KB/s
flushThrottleMS = 100
defaultSendQueueCapacity = 1
defaultRecvBufferCapacity = 4096
@ -608,7 +608,7 @@ func (ch *Channel) recvMsgPacket(packet msgPacket) ([]byte, error) {
func (ch *Channel) updateStats() {
// Exponential decay of stats.
// TODO: optimize.
ch.recentlySent = int64(float64(ch.recentlySent) * 0.5)
ch.recentlySent = int64(float64(ch.recentlySent) * 0.8)
}
//-----------------------------------------------------------------------------