[Java] Processing time measurement method memo

code

long hogeStart = System.currentTimeMillis();

//Processing you want to measure

long hogeEnd = System.currentTimeMillis();
long hogeTime = hogeEnd - hogeStart;
System.out.println("processing time: " hogeTime + " ms");

Actual use

--Register the following as a snippet with Clipy etc.

long hogeStart = System.currentTimeMillis();
long hogeEnd = System.currentTimeMillis();
long hogeTime = hogeEnd - hogeStart;

--The process you want to measure is inserted between lines. d321cd92f73344804aefe4af36029bfa.gif

--If you want to measure multiple processes, replace hoge with any process name you want to measure. 212ada11a3dee2dd897f51e7c50139c0.gif

Recommended Posts

[Java] Processing time measurement method memo
Java learning memo (method)
[Java ~ Method ~] Study memo (5)
Java Silver Study Method Memo
Create a java method [Memo] [java11]
[Java] Timer processing implementation method
Java method
java (method)
Java memo
Java method
Processing time measurement for each BCrypt + stretch count in Java
[Java] method
Directory change monitoring method memo (Java, Kotlin)
[Java ~ Conditional branching / Iterative processing ~] Study memo (3)
java anything memo
Java Silver memo
Java8 method reference
Java SE 7 memo
[Java] forEach method
java anything memo 2
[Java] Multi-thread processing
java8 method reference
[Java] Random method
[Java] split method
Java specification memo
[Java] Stream processing
Java pattern memo
java iterative processing
Java coverage measurement library
Java development environment memo
Java learning 2 (learning calculation method)
java basic knowledge memo
Java Kuche Day memo
About Java method binding
About method splitting (Java)
java se 8 programmer Ⅰ memo
Java paid private memo
Studying Java 8 (see method)
[Java ~ Array ~] Study memo 4
Java learning memo (basic)
(Memo) Java for statement
Learning memo when learning Java for the first time (personal learning memo)
Java lambda expression [memo]
Java learning memo (interface)
Java random, various processing
Java learning memo (inheritance)
[Java] Basic method notes
[Memo] Java Linked List
[Personal memo] Frequently used Java grammar updated from time to time
[Java Bronze] Learning memo (interface, static method, type conversion, etc.)
Java (WebSphere Application Server) memo [1]
[Java] Variable name naming memo
Java memo (standard class) substring
[Java] New Thread generation method (2)
[Java] Multi-thread processing --Exclusive control
Java learning memo (data type)
Java GC method determination conditions
Java memo (standard class) length
[Java ~ Boolean value ~] Study memo (2)
Java Silver exam preparation memo
Spring Security Usage memo Method security