browser
browser copied to clipboard
Need Suggestion : CPU is reaching high at 50-60 tps
Hi @dineshgowda24
Thanks for creating this library. Just need your suggestion on the CPU usage. I am seeing very high CPU (~ 80% ) while I am on 50 TPS load test. If I remove the browser detection code. Its come to 10-15%. Did you test the lib against heavy traffic and experience anything like this?
FYI, I am using a 4 VCPU and 16G RAM machine to perform the test.
Example code which I use it for each http request to detect browser from UA.
b, err := browser.NewBrowser(ua)
if err != nil {
return "unknown"
}
return b.Name()
}