Skip to content

Commit 3bf7dd0

Browse files
committed
fix: improve benchmarking
1 parent b13aa39 commit 3bf7dd0

File tree

3 files changed

+0
-4
lines changed

3 files changed

+0
-4
lines changed

server.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,6 @@ func (srv *Server) onRequest(req *sip.Request, tx sip.ServerTransaction) {
243243
// Transaction layer is the one who controls concurency execution of every request
244244
// so in this case we should avoid adding more concurency
245245
srv.handleRequest(req, tx)
246-
// go srv.handleRequest(req, tx)
247246
}
248247

249248
// handleRequest must be run in seperate goroutine

server_integration_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ func BenchmarkIntegrationClientServer(t *testing.B) {
262262
tx.Terminate()
263263
}
264264

265-
// t.ReportMetric(float64(t.N)/max(t.Elapsed().Seconds(), 1), "req/s")
266265
})
267266
t.ReportMetric(float64(t.N)/max(t.Elapsed().Seconds(), 1), "req/s")
268267

sip/transaction_layer.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,8 @@ func (txl *TransactionLayer) handleMessage(msg Message) {
6565
switch msg := msg.(type) {
6666
case *Request:
6767
go txl.handleRequest(msg)
68-
// txl.handleRequest(msg)
6968
case *Response:
7069
go txl.handleResponse(msg)
71-
// txl.handleResponse(msg)
7270
default:
7371
txl.log.Error().Msg("unsupported message, skip it")
7472
}

0 commit comments

Comments
 (0)