Add size function

(Partially cherry picked from b1a4866)
Add performance logging
added dump classic to katnetic