opengovsg / postmangovsg

Templated message sending for public officers
https://postman.gov.sg
60 stars 16 forks source link

feat: add profiler #2283

Closed KishenKumarrrrr closed 1 week ago

KishenKumarrrrr commented 1 week ago

Problem

This PR is a continuation of #2282 . The purpose of turning on profiling is for us to collect some concrete data on what the exact bottleneck is during callbacks so we don't succumb to premature optimisation.

There is a risk that turning this feature on in production would be detrimental to the application performance. As such, I am only doing so for 20% of all our servers.

jwnicholas99 commented 1 week ago

As discussed in real life, the probability of >30 enabled profiling is 0.6%

image