2011-10-12 71 views
0

我需要弄清楚某些代码在Velocity(VTL)中所花的时间。这样的事情:Apache Velocity(VTL)性能分析

#set(start = getTickCount()) 

... do some stuff that takes a while ... 

#set(end = getTickCount()) 

#set(time = end - start) 

It took $time milliseconds! 

速度有一个getTickCount()函数或一些等效?或者还有其他一些建议的分析方法吗?

回答

1

我的一个股票VelocityTools是一个日志分析器,但如果你想要更多的手动为你指示做,你可以只坚持一个工具,在那里,让你的currentTimeMillis,或者直接添加System类为每static classes docs