Skip to content

Commit

Permalink
fix: improve benchmarking
Browse files Browse the repository at this point in the history
  • Loading branch information
emiago committed Feb 9, 2024
1 parent b13aa39 commit 3bf7dd0
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion server_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
2 changes: 0 additions & 2 deletions sip/transaction_layer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit 3bf7dd0

Please sign in to comment.