提交 f17c1051 编写于 作者: 武汉红喜's avatar 武汉红喜

Arthas

上级 d1c0e064
......@@ -47,7 +47,7 @@ whatsmars-zk | zookeeper remoting 封装
### Friendship links
- [*阿里巴巴Java开发手册*](https://github.com/alibaba/Alibaba-Java-Coding-Guidelines) 📚
- *技术wiki* [wiki.hongxi.org](http://wiki.hongxi.org) ✏️
- *Go战略* [go.hongxi.org](http://go.hongxi.org) 🚙
- [*Java诊断利器Arthas*](https://github.com/alibaba/arthas) 👀
### Warm tips
- Java两大核心技术:并发,NIO
......
package org.hongxi.whatsmars.spring.util;
import org.springframework.util.StopWatch;
/**
* Created by shenhongxi on 2019/12/16.
*/
public class StopWatchTest {
public static void main(String[] args) {
StopWatch stopWatch = new StopWatch("Test");
int n = 0;
stopWatch.start("task1");
for (int i = 0; i < 100000; i++) {
n++;
}
stopWatch.stop();
stopWatch.start("task2");
for (int i = 0; i < 1000000; i++) {
n++;
}
stopWatch.stop();
System.out.println(stopWatch.prettyPrint());
System.out.println(stopWatch.shortSummary());
System.out.println(stopWatch);
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册