0
는 다음 코드를 고려하십시오 필요 :수집 메트릭, 설명은
StopWatch stopWatch = new StopWatch();
stopWatch.start();
Thread.sleep(1000); //< ---- event 1
stopWatch.split();
Thread.sleep(2000); //< ---- event 2
stopWatch.split();
Thread.sleep(3000); //< ---- event 3
System.out.println(stopWatch.getStartTime());
System.out.println(stopWatch.getSplitTime());
System.out.println(stopWatch.toString());
System.out.println(stopWatch.toSplitString());
내가 어떻게 수집 할 수 있습니다, 심지어 StopWatch
를 사용하는 나는 많은 서브 이벤트로 단일 이벤트를 분해 할 수있는 것 같지만 이 정보? 예를 들어 위의 코드를 살펴보면 첫 번째 이벤트가 1 초, 두 번째 이벤트는 2 초, 세 번째 이벤트는 3 초가 걸리는 이벤트가 3 개라는 것을 알 수 있습니까?
알려 주시기 바랍니다.
Stopwatch가 갈 길이 없다면, 내가 이런 식으로 사용할 수있는 기존 라이브러리가 있습니까?
오른쪽. 그게 내가 끝내 준거야. 생각 나는 간단하게 뭔가를 놓칠 수 있습니다. – JAM