Browse Source

Tweak send/recv rates for performance test

pull/456/head
Jae Kwon 9 years ago
parent
commit
8b308c1c08
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      connection.go

+ 3
- 3
connection.go 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)
}
//-----------------------------------------------------------------------------


Loading…
Cancel
Save