From 3bf7dd059b409afebf10582f65659710adf7999d Mon Sep 17 00:00:00 2001 From: Emir Aganovic Date: Fri, 9 Feb 2024 22:50:28 +0100 Subject: [PATCH] fix: improve benchmarking --- server.go | 1 - server_integration_test.go | 1 - sip/transaction_layer.go | 2 -- 3 files changed, 4 deletions(-) diff --git a/server.go b/server.go index ea07468..7d191f4 100644 --- a/server.go +++ b/server.go @@ -243,7 +243,6 @@ func (srv *Server) onRequest(req *sip.Request, tx sip.ServerTransaction) { // Transaction layer is the one who controls concurency execution of every request // so in this case we should avoid adding more concurency srv.handleRequest(req, tx) - // go srv.handleRequest(req, tx) } // handleRequest must be run in seperate goroutine diff --git a/server_integration_test.go b/server_integration_test.go index 98b75ff..6469375 100644 --- a/server_integration_test.go +++ b/server_integration_test.go @@ -262,7 +262,6 @@ func BenchmarkIntegrationClientServer(t *testing.B) { tx.Terminate() } - // t.ReportMetric(float64(t.N)/max(t.Elapsed().Seconds(), 1), "req/s") }) t.ReportMetric(float64(t.N)/max(t.Elapsed().Seconds(), 1), "req/s") diff --git a/sip/transaction_layer.go b/sip/transaction_layer.go index c32332f..30425a0 100644 --- a/sip/transaction_layer.go +++ b/sip/transaction_layer.go @@ -65,10 +65,8 @@ func (txl *TransactionLayer) handleMessage(msg Message) { switch msg := msg.(type) { case *Request: go txl.handleRequest(msg) - // txl.handleRequest(msg) case *Response: go txl.handleResponse(msg) - // txl.handleResponse(msg) default: txl.log.Error().Msg("unsupported message, skip it") }