Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加记录运行时间以便效率分析的工具PerformanceUtils #135

Merged
merged 1 commit into from
Nov 9, 2018

Conversation

natineprince
Copy link
Collaborator

多线程中记录任意两个代码点间的耗时,在不需要aop的情况下,可以使用该工具,比如A类中执行A,B,C上个方法,A方法中有一个步骤a1,需要记录从它开始做,到B方法中步骤b2的耗时,按业务逻辑又无法独立为独立方法以便切面时。

Copy link
Collaborator

@calvin1978 calvin1978 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public static void remove() {
localTimer.remove();
localTimerMap.remove();
}

为什么remove方法要顺便清理localTimerMap?

@natineprince
Copy link
Collaborator Author

当时考虑无参数的localTimer是可以复用的,如果需要清理的话,那应该整体都可以清理了。

@calvin1978 calvin1978 merged commit 8786a8b into vipshop:master Nov 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants