atuttle / Taffy

:candy: The REST Web Service framework for ColdFusion and Lucee
http://taffy.io
Other
226 stars 118 forks source link

Track performance metrics of cold starts (helps debug startup performance issues) #431

Open atuttle opened 1 year ago

atuttle commented 1 year ago

I was recently helping a company with performance issues they were seeing on cold starts (e.g. just restarted their CFML service, so there is nothing cached) for their Taffy API. In order to help track down problem files, I sent them a customized version of Taffy that tracked the time used for almost everything that happened while Taffy's internal bean factory was bootstrapping resources and their dependencies.

The approach and display was crude so I would want to rewrite it from scratch, but I think the general idea is sound.

Basically, any time Taffy creates an instance of non-taffy components, it would track the time to do so (using getTickCount()) and then log that to a new dataset inside of application._taffy. Then it can be displayed, either on the dashboard, or in headers, or as a custom built-in route response.