StopWatch stopWatch = new StopWatch("id");
stopWatch.start("taskName1");
task1();
stopWatch.stop();
stopWatch.start("taskName2");
task2();
stopWatch.stop();
stopWatch.getTotalTimeMillis(); // 전체 작업시간
stopWatch.prettyPrint();
// StopWatch 'id': running time (millis) = 2000
// -----------------------------------------
// ms % Task name
// -----------------------------------------
// 01000 050% taskName1
// 01000 050% taskName2'Java > Spring' 카테고리의 다른 글
| Spring AOP: Aspect Oriented Programming with Spring (0) | 2020.07.15 |
|---|---|
| Custom Constraint (0) | 2020.07.07 |
| @Transactional Attribute (0) | 2020.06.29 |
| Spring에서 Annotation으로 정의된 Validation 확인 (0) | 2020.04.12 |
| Spring 프로젝트 생성시 maven CoreException issue (4) | 2018.09.16 |