From 8b308c1c0829406c0e7c12354112ed321a15bdba Mon Sep 17 00:00:00 2001 From: Jae Kwon Date: Wed, 9 Dec 2015 13:53:50 -0800 Subject: [PATCH] Tweak send/recv rates for performance test --- connection.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/connection.go b/connection.go index 494fdd75..944a5935 100644 --- a/connection.go +++ b/connection.go @@ -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) } //-----------------------------------------------------------------------------