Re:You Don't Know Jack about Application Performance
by ndriscoll on Monday July 24, 2023 @09:57PM
(#36856910)
You can pause your timer while awaiting an async block, or start a secondary timer/span and measure the async part too (which you can then subtract out).
You can also benchmark portions in isolation. E.g. measure your application with the database mocked, and measure the database without your application. I've found that for example if my application can handle ~100k requests/second with the db mocked, and the db can handle ~300k updates/second, then I might expect to handle 1/(1/100000+1/300000) = 75k requests/second (assuming the same machine so they contend for CPU time). In practice, I've measured ~70k/second for the combined system, so the linear scaling calculation is mostly accurate.
You can also benchmark portions in isolation. E.g. measure your application with the database mocked, and measure the database without your application. I've found that for example if my application can handle ~100k requests/second with the db mocked, and the db can handle ~300k updates/second, then I might expect to handle 1/(1/100000+1/300000) = 75k requests/second (assuming the same machine so they contend for CPU time). In practice, I've measured ~70k/second for the combined system, so the linear scaling calculation is mostly accurate.