Code Statistics

I just had the idea about generating code statistics for existing apps and extensions.

It could be very interesting to know which classes and methods are the most used ones or the classes which are often subclassed.

Having that kind of functionality can be beneficial not only in optimizing the flow, but also building some optimized YiiLite versions for the project to optimize load times and cache it with opcode cache.

Totally +1 one on this one.

i think this is a very excellent idea.

this will also tell weather a particular function worth to be continued or not.

also it will be a means to know how to design the api(s) for your application as well as how to extend the application based on dependencies.

Why dont you just use any profiler?

Profiler will show everything you need - e.g. number of hits for a particular function, min-max-avg execution time etc…

example - PHP profiler output example (NUSphere PHPEd)

yea cachegrind files will do the same. Although you can spend an eternity going through those logs and on occasion I have.