SlideShare a Scribd company logo
1 of 8
Java, 특정 로직에 대한 성능 확인(속도 체크) 김용환
System.currentTimeMillis() 소스 long startTime = System.currentTimeMillis();Thread.sleep(1000);long estimatedTime = System.currentTimeMillis() - startTime;System.out.println("took " + estimatedTime + " ms"); 결과 took 1000 ms
System.nanoTime()  소스 long time1 = System.nanoTime();Thread.sleep(1000);long time2 = System.nanoTime();long timeSpent = time2 - time1;System.out.println("took " + timeSpent + " ns"); 결과 took 1000232514 ns
Commons-lang의 StopWatch (2.3) import org.apache.commons.lang.time.StopWatch;..StopWatchstopWatch = new StopWatch();stopWatch.reset();stopWatch.start();Thread.sleep(2000);stopWatch.stop();System.out.println(stopWatch.toString());  stopWatch.reset();stopWatch.start();Thread.sleep(5000);stopWatch.stop();System.out.println(stopWatch.toString());  stopWatch.reset();stopWatch.start();Thread.sleep(3000);stopWatch.stop();System.out.println(stopWatch.toString()); 소스 0:00:02.0000:00:05.0000:00:03.000 결과
Spring core lib에 있는 util성 StopWatch (3.0) 소스 import org.springframework.util.StopWatch;...StopWatchstopWatch = new StopWatch("Stop Watch");stopWatch.start("initializing");Thread.sleep(2000);stopWatch.stop();System.out.println("took " + stopWatch.getLastTaskTimeMillis() + " ms"); stopWatch.start("processing");Thread.sleep(5000);stopWatch.stop();System.out.println("took " + stopWatch.getLastTaskTimeMillis() + " ms");  stopWatch.start("finalizing");Thread.sleep(3000);stopWatch.stop();System.out.println("took " + stopWatch.getLastTaskTimeMillis() + " ms");  System.out.println(stopWatch.toString());System.out.println();System.out.println(stopWatch.prettyPrint());
Spring core lib에 있는 util성 StopWatch (3.0) 결과 took 2000 mstook 5000 mstook 3001 msStopWatch 'Stop Watch': running time (millis) = 10001; [initializing] took 2000 = 20%; [processing] took 5000 = 50%; [finalizing] took 3001 = 30% StopWatch 'Stop Watch': running time (millis) = 10001-----------------------------------------ms     %     Task name-----------------------------------------02000  020%  initializing05000  050%  processing03001  030%  finalizing
남의 것 사용 그냥 인터넷에서 남들이 만든 StopWatch를 찾아서 copy&paste한다.http://www.devdaily.com/blog/post/java/stopwatch-class-that-can-be-used-for-timings-benchmarks
Commons-lang의 StopWatch와 Spring Util의 StopWatch비교

More Related Content

What's hot

Dev ops on startup environment
Dev ops on startup environmentDev ops on startup environment
Dev ops on startup environmentEvaldo Felipe
 
pg / shardman: шардинг в PostgreSQL на основе postgres / fdw, pg / pathman и ...
pg / shardman: шардинг в PostgreSQL на основе postgres / fdw, pg / pathman и ...pg / shardman: шардинг в PostgreSQL на основе postgres / fdw, pg / pathman и ...
pg / shardman: шардинг в PostgreSQL на основе postgres / fdw, pg / pathman и ...Ontico
 
Odoo Performance Limits
Odoo Performance LimitsOdoo Performance Limits
Odoo Performance LimitsOdoo
 
Scheduling torque-maui-tutorial
Scheduling torque-maui-tutorialScheduling torque-maui-tutorial
Scheduling torque-maui-tutorialSantosh Kumar
 
Tarantool как платформа для микросервисов / Антон Резников, Владимир Перепели...
Tarantool как платформа для микросервисов / Антон Резников, Владимир Перепели...Tarantool как платформа для микросервисов / Антон Резников, Владимир Перепели...
Tarantool как платформа для микросервисов / Антон Резников, Владимир Перепели...Ontico
 
Am I reading GC logs Correctly?
Am I reading GC logs Correctly?Am I reading GC logs Correctly?
Am I reading GC logs Correctly?Tier1 App
 
Advanced patterns in asynchronous programming
Advanced patterns in asynchronous programmingAdvanced patterns in asynchronous programming
Advanced patterns in asynchronous programmingMichael Arenzon
 
Cloud Services - Gluecon 2010
Cloud Services - Gluecon 2010Cloud Services - Gluecon 2010
Cloud Services - Gluecon 2010Oren Teich
 
Pick diamonds from garbage
Pick diamonds from garbagePick diamonds from garbage
Pick diamonds from garbageTier1 App
 
Training Slides: Basics 105: Backup, Recovery and Provisioning Within Tungste...
Training Slides: Basics 105: Backup, Recovery and Provisioning Within Tungste...Training Slides: Basics 105: Backup, Recovery and Provisioning Within Tungste...
Training Slides: Basics 105: Backup, Recovery and Provisioning Within Tungste...Continuent
 
Мастер-класс "Логическая репликация и Avito" / Константин Евтеев, Михаил Тюр...
Мастер-класс "Логическая репликация и Avito" / Константин Евтеев,  Михаил Тюр...Мастер-класс "Логическая репликация и Avito" / Константин Евтеев,  Михаил Тюр...
Мастер-класс "Логическая репликация и Avito" / Константин Евтеев, Михаил Тюр...Ontico
 
JS Lab2017_Андрей Кучеренко _Разработка мультипакетных приложения: причины, с...
JS Lab2017_Андрей Кучеренко _Разработка мультипакетных приложения: причины, с...JS Lab2017_Андрей Кучеренко _Разработка мультипакетных приложения: причины, с...
JS Lab2017_Андрей Кучеренко _Разработка мультипакетных приложения: причины, с...GeeksLab Odessa
 
Counter Wars (JEEConf 2016)
Counter Wars (JEEConf 2016)Counter Wars (JEEConf 2016)
Counter Wars (JEEConf 2016)Alexey Fyodorov
 
Spork || How To Streamline Your TDD Process
Spork || How To Streamline Your TDD ProcessSpork || How To Streamline Your TDD Process
Spork || How To Streamline Your TDD ProcessArik Fraimovich
 
Much Ado About Blocking: Wait/Wakke in the Linux Kernel
Much Ado About Blocking: Wait/Wakke in the Linux KernelMuch Ado About Blocking: Wait/Wakke in the Linux Kernel
Much Ado About Blocking: Wait/Wakke in the Linux KernelDavidlohr Bueso
 
Backtracking Algorithmic Complexity Attacks Against a NIDS
Backtracking Algorithmic Complexity Attacks Against a NIDSBacktracking Algorithmic Complexity Attacks Against a NIDS
Backtracking Algorithmic Complexity Attacks Against a NIDSamiable_indian
 

What's hot (20)

Openstack Neutron LBAAS
Openstack Neutron LBAAS Openstack Neutron LBAAS
Openstack Neutron LBAAS
 
Multi threading
Multi threadingMulti threading
Multi threading
 
Sge
SgeSge
Sge
 
Dev ops on startup environment
Dev ops on startup environmentDev ops on startup environment
Dev ops on startup environment
 
pg / shardman: шардинг в PostgreSQL на основе postgres / fdw, pg / pathman и ...
pg / shardman: шардинг в PostgreSQL на основе postgres / fdw, pg / pathman и ...pg / shardman: шардинг в PostgreSQL на основе postgres / fdw, pg / pathman и ...
pg / shardman: шардинг в PostgreSQL на основе postgres / fdw, pg / pathman и ...
 
Python multithreaded programming
Python   multithreaded programmingPython   multithreaded programming
Python multithreaded programming
 
Odoo Performance Limits
Odoo Performance LimitsOdoo Performance Limits
Odoo Performance Limits
 
Scheduling torque-maui-tutorial
Scheduling torque-maui-tutorialScheduling torque-maui-tutorial
Scheduling torque-maui-tutorial
 
Tarantool как платформа для микросервисов / Антон Резников, Владимир Перепели...
Tarantool как платформа для микросервисов / Антон Резников, Владимир Перепели...Tarantool как платформа для микросервисов / Антон Резников, Владимир Перепели...
Tarantool как платформа для микросервисов / Антон Резников, Владимир Перепели...
 
Am I reading GC logs Correctly?
Am I reading GC logs Correctly?Am I reading GC logs Correctly?
Am I reading GC logs Correctly?
 
Advanced patterns in asynchronous programming
Advanced patterns in asynchronous programmingAdvanced patterns in asynchronous programming
Advanced patterns in asynchronous programming
 
Cloud Services - Gluecon 2010
Cloud Services - Gluecon 2010Cloud Services - Gluecon 2010
Cloud Services - Gluecon 2010
 
Pick diamonds from garbage
Pick diamonds from garbagePick diamonds from garbage
Pick diamonds from garbage
 
Training Slides: Basics 105: Backup, Recovery and Provisioning Within Tungste...
Training Slides: Basics 105: Backup, Recovery and Provisioning Within Tungste...Training Slides: Basics 105: Backup, Recovery and Provisioning Within Tungste...
Training Slides: Basics 105: Backup, Recovery and Provisioning Within Tungste...
 
Мастер-класс "Логическая репликация и Avito" / Константин Евтеев, Михаил Тюр...
Мастер-класс "Логическая репликация и Avito" / Константин Евтеев,  Михаил Тюр...Мастер-класс "Логическая репликация и Avito" / Константин Евтеев,  Михаил Тюр...
Мастер-класс "Логическая репликация и Avito" / Константин Евтеев, Михаил Тюр...
 
JS Lab2017_Андрей Кучеренко _Разработка мультипакетных приложения: причины, с...
JS Lab2017_Андрей Кучеренко _Разработка мультипакетных приложения: причины, с...JS Lab2017_Андрей Кучеренко _Разработка мультипакетных приложения: причины, с...
JS Lab2017_Андрей Кучеренко _Разработка мультипакетных приложения: причины, с...
 
Counter Wars (JEEConf 2016)
Counter Wars (JEEConf 2016)Counter Wars (JEEConf 2016)
Counter Wars (JEEConf 2016)
 
Spork || How To Streamline Your TDD Process
Spork || How To Streamline Your TDD ProcessSpork || How To Streamline Your TDD Process
Spork || How To Streamline Your TDD Process
 
Much Ado About Blocking: Wait/Wakke in the Linux Kernel
Much Ado About Blocking: Wait/Wakke in the Linux KernelMuch Ado About Blocking: Wait/Wakke in the Linux Kernel
Much Ado About Blocking: Wait/Wakke in the Linux Kernel
 
Backtracking Algorithmic Complexity Attacks Against a NIDS
Backtracking Algorithmic Complexity Attacks Against a NIDSBacktracking Algorithmic Complexity Attacks Against a NIDS
Backtracking Algorithmic Complexity Attacks Against a NIDS
 

Similar to 속도체크

import java-util-Arrays- import java-io-PrintWriter- import java-io-Fi.pdf
import java-util-Arrays- import java-io-PrintWriter- import java-io-Fi.pdfimport java-util-Arrays- import java-io-PrintWriter- import java-io-Fi.pdf
import java-util-Arrays- import java-io-PrintWriter- import java-io-Fi.pdfadhityalapcare
 
Deep dumpster diving 2010
Deep dumpster diving 2010Deep dumpster diving 2010
Deep dumpster diving 2010RonnBlack
 
please help finish sorting methods- import java-util-Arrays- import ja.pdf
please help finish sorting methods- import java-util-Arrays- import ja.pdfplease help finish sorting methods- import java-util-Arrays- import ja.pdf
please help finish sorting methods- import java-util-Arrays- import ja.pdfanfenterprises
 
Java util concurrent
Java util concurrentJava util concurrent
Java util concurrentRoger Xia
 
REAL TIME OPERATING SYSTEM PART 1
REAL TIME OPERATING SYSTEM PART 1REAL TIME OPERATING SYSTEM PART 1
REAL TIME OPERATING SYSTEM PART 1Embeddedcraft Craft
 
JAVA.Q4 Create a Time class. This class will represent a point in.pdf
JAVA.Q4 Create a Time class. This class will represent a point in.pdfJAVA.Q4 Create a Time class. This class will represent a point in.pdf
JAVA.Q4 Create a Time class. This class will represent a point in.pdfkarymadelaneyrenne19
 
Fork and join framework
Fork and join frameworkFork and join framework
Fork and join frameworkMinh Tran
 
JSR 310. New Date API in Java 8
JSR 310. New Date API in Java 8JSR 310. New Date API in Java 8
JSR 310. New Date API in Java 8Serhii Kartashov
 
lec3 (1).ppt megerments for peromomence
lec3 (1).ppt megerments   for peromomencelec3 (1).ppt megerments   for peromomence
lec3 (1).ppt megerments for peromomenceMadhuGupta99385
 
Joker 2015 - Валеев Тагир - Что же мы измеряем?
Joker 2015 - Валеев Тагир - Что же мы измеряем?Joker 2015 - Валеев Тагир - Что же мы измеряем?
Joker 2015 - Валеев Тагир - Что же мы измеряем?tvaleev
 
Engineering slides venay magen
Engineering slides   venay magenEngineering slides   venay magen
Engineering slides venay magenvenaymagen19
 
Java practice programs for beginners
Java practice programs for beginnersJava practice programs for beginners
Java practice programs for beginnersishan0019
 
Anton Moldovan "Load testing which you always wanted"
Anton Moldovan "Load testing which you always wanted"Anton Moldovan "Load testing which you always wanted"
Anton Moldovan "Load testing which you always wanted"Fwdays
 
Where the wild things are - Benchmarking and Micro-Optimisations
Where the wild things are - Benchmarking and Micro-OptimisationsWhere the wild things are - Benchmarking and Micro-Optimisations
Where the wild things are - Benchmarking and Micro-OptimisationsMatt Warren
 
Timers in Unix/Linux
Timers in Unix/LinuxTimers in Unix/Linux
Timers in Unix/Linuxgeeksrik
 
Python profiling
Python profilingPython profiling
Python profilingdreampuf
 
Akka Cluster in Java - JCConf 2015
Akka Cluster in Java - JCConf 2015Akka Cluster in Java - JCConf 2015
Akka Cluster in Java - JCConf 2015Jiayun Zhou
 

Similar to 속도체크 (20)

import java-util-Arrays- import java-io-PrintWriter- import java-io-Fi.pdf
import java-util-Arrays- import java-io-PrintWriter- import java-io-Fi.pdfimport java-util-Arrays- import java-io-PrintWriter- import java-io-Fi.pdf
import java-util-Arrays- import java-io-PrintWriter- import java-io-Fi.pdf
 
Deep dumpster diving 2010
Deep dumpster diving 2010Deep dumpster diving 2010
Deep dumpster diving 2010
 
please help finish sorting methods- import java-util-Arrays- import ja.pdf
please help finish sorting methods- import java-util-Arrays- import ja.pdfplease help finish sorting methods- import java-util-Arrays- import ja.pdf
please help finish sorting methods- import java-util-Arrays- import ja.pdf
 
Thread 1
Thread 1Thread 1
Thread 1
 
Java util concurrent
Java util concurrentJava util concurrent
Java util concurrent
 
REAL TIME OPERATING SYSTEM PART 1
REAL TIME OPERATING SYSTEM PART 1REAL TIME OPERATING SYSTEM PART 1
REAL TIME OPERATING SYSTEM PART 1
 
JAVA.Q4 Create a Time class. This class will represent a point in.pdf
JAVA.Q4 Create a Time class. This class will represent a point in.pdfJAVA.Q4 Create a Time class. This class will represent a point in.pdf
JAVA.Q4 Create a Time class. This class will represent a point in.pdf
 
Fork and join framework
Fork and join frameworkFork and join framework
Fork and join framework
 
JSR 310. New Date API in Java 8
JSR 310. New Date API in Java 8JSR 310. New Date API in Java 8
JSR 310. New Date API in Java 8
 
lec3 (1).ppt megerments for peromomence
lec3 (1).ppt megerments   for peromomencelec3 (1).ppt megerments   for peromomence
lec3 (1).ppt megerments for peromomence
 
Joker 2015 - Валеев Тагир - Что же мы измеряем?
Joker 2015 - Валеев Тагир - Что же мы измеряем?Joker 2015 - Валеев Тагир - Что же мы измеряем?
Joker 2015 - Валеев Тагир - Что же мы измеряем?
 
Engineering slides venay magen
Engineering slides   venay magenEngineering slides   venay magen
Engineering slides venay magen
 
Java practice programs for beginners
Java practice programs for beginnersJava practice programs for beginners
Java practice programs for beginners
 
Anton Moldovan "Load testing which you always wanted"
Anton Moldovan "Load testing which you always wanted"Anton Moldovan "Load testing which you always wanted"
Anton Moldovan "Load testing which you always wanted"
 
Process scheduling linux
Process scheduling linuxProcess scheduling linux
Process scheduling linux
 
Where the wild things are - Benchmarking and Micro-Optimisations
Where the wild things are - Benchmarking and Micro-OptimisationsWhere the wild things are - Benchmarking and Micro-Optimisations
Where the wild things are - Benchmarking and Micro-Optimisations
 
Timers in Unix/Linux
Timers in Unix/LinuxTimers in Unix/Linux
Timers in Unix/Linux
 
Python profiling
Python profilingPython profiling
Python profiling
 
Timer Interceptor in Mule part 2
Timer Interceptor in Mule part 2Timer Interceptor in Mule part 2
Timer Interceptor in Mule part 2
 
Akka Cluster in Java - JCConf 2015
Akka Cluster in Java - JCConf 2015Akka Cluster in Java - JCConf 2015
Akka Cluster in Java - JCConf 2015
 

More from knight1128

Hancom MDS Conference - KAKAO DEVOPS Practice (카카오 스토리의 Devops 사례)
Hancom MDS Conference - KAKAO DEVOPS Practice (카카오 스토리의 Devops 사례)Hancom MDS Conference - KAKAO DEVOPS Practice (카카오 스토리의 Devops 사례)
Hancom MDS Conference - KAKAO DEVOPS Practice (카카오 스토리의 Devops 사례)knight1128
 
Spring MVC 3 Restful
Spring MVC 3 RestfulSpring MVC 3 Restful
Spring MVC 3 Restfulknight1128
 
Jersey framework
Jersey frameworkJersey framework
Jersey frameworkknight1128
 
Google Protocol buffer
Google Protocol bufferGoogle Protocol buffer
Google Protocol bufferknight1128
 
Jdk(java) 7 - 5. invoke-dynamic
Jdk(java) 7 - 5. invoke-dynamicJdk(java) 7 - 5. invoke-dynamic
Jdk(java) 7 - 5. invoke-dynamicknight1128
 
Jdk(java) 7 - 6 기타기능
Jdk(java) 7 - 6 기타기능Jdk(java) 7 - 6 기타기능
Jdk(java) 7 - 6 기타기능knight1128
 
Jdk 7 4-forkjoin
Jdk 7 4-forkjoinJdk 7 4-forkjoin
Jdk 7 4-forkjoinknight1128
 
공유 Jdk 7-2-project coin
공유 Jdk 7-2-project coin공유 Jdk 7-2-project coin
공유 Jdk 7-2-project coinknight1128
 
공유 Jdk 7-1-short introduction
공유 Jdk 7-1-short introduction공유 Jdk 7-1-short introduction
공유 Jdk 7-1-short introductionknight1128
 
아마존 Aws 서비스_연구
아마존 Aws 서비스_연구아마존 Aws 서비스_연구
아마존 Aws 서비스_연구knight1128
 
구글크롬Os
구글크롬Os구글크롬Os
구글크롬Osknight1128
 
하이브리드앱
하이브리드앱하이브리드앱
하이브리드앱knight1128
 
오픈소스를 활용한 Batch_처리_플랫폼_공유
오픈소스를 활용한 Batch_처리_플랫폼_공유오픈소스를 활용한 Batch_처리_플랫폼_공유
오픈소스를 활용한 Batch_처리_플랫폼_공유knight1128
 
Ssl 하드웨어 가속기를 이용한 성능 향상
Ssl 하드웨어 가속기를 이용한 성능 향상Ssl 하드웨어 가속기를 이용한 성능 향상
Ssl 하드웨어 가속기를 이용한 성능 향상knight1128
 

More from knight1128 (19)

Hancom MDS Conference - KAKAO DEVOPS Practice (카카오 스토리의 Devops 사례)
Hancom MDS Conference - KAKAO DEVOPS Practice (카카오 스토리의 Devops 사례)Hancom MDS Conference - KAKAO DEVOPS Practice (카카오 스토리의 Devops 사례)
Hancom MDS Conference - KAKAO DEVOPS Practice (카카오 스토리의 Devops 사례)
 
Comet
CometComet
Comet
 
Apache avro
Apache avroApache avro
Apache avro
 
Apache Thrift
Apache ThriftApache Thrift
Apache Thrift
 
Redis
RedisRedis
Redis
 
Spring MVC 3 Restful
Spring MVC 3 RestfulSpring MVC 3 Restful
Spring MVC 3 Restful
 
Jersey framework
Jersey frameworkJersey framework
Jersey framework
 
Google Protocol buffer
Google Protocol bufferGoogle Protocol buffer
Google Protocol buffer
 
Jdk(java) 7 - 5. invoke-dynamic
Jdk(java) 7 - 5. invoke-dynamicJdk(java) 7 - 5. invoke-dynamic
Jdk(java) 7 - 5. invoke-dynamic
 
Jdk(java) 7 - 6 기타기능
Jdk(java) 7 - 6 기타기능Jdk(java) 7 - 6 기타기능
Jdk(java) 7 - 6 기타기능
 
Jdk 7 4-forkjoin
Jdk 7 4-forkjoinJdk 7 4-forkjoin
Jdk 7 4-forkjoin
 
Jdk 7 3-nio2
Jdk 7 3-nio2Jdk 7 3-nio2
Jdk 7 3-nio2
 
공유 Jdk 7-2-project coin
공유 Jdk 7-2-project coin공유 Jdk 7-2-project coin
공유 Jdk 7-2-project coin
 
공유 Jdk 7-1-short introduction
공유 Jdk 7-1-short introduction공유 Jdk 7-1-short introduction
공유 Jdk 7-1-short introduction
 
아마존 Aws 서비스_연구
아마존 Aws 서비스_연구아마존 Aws 서비스_연구
아마존 Aws 서비스_연구
 
구글크롬Os
구글크롬Os구글크롬Os
구글크롬Os
 
하이브리드앱
하이브리드앱하이브리드앱
하이브리드앱
 
오픈소스를 활용한 Batch_처리_플랫폼_공유
오픈소스를 활용한 Batch_처리_플랫폼_공유오픈소스를 활용한 Batch_처리_플랫폼_공유
오픈소스를 활용한 Batch_처리_플랫폼_공유
 
Ssl 하드웨어 가속기를 이용한 성능 향상
Ssl 하드웨어 가속기를 이용한 성능 향상Ssl 하드웨어 가속기를 이용한 성능 향상
Ssl 하드웨어 가속기를 이용한 성능 향상
 

Recently uploaded

MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLSeo
 
Regression analysis: Simple Linear Regression Multiple Linear Regression
Regression analysis:  Simple Linear Regression Multiple Linear RegressionRegression analysis:  Simple Linear Regression Multiple Linear Regression
Regression analysis: Simple Linear Regression Multiple Linear RegressionRavindra Nath Shukla
 
A DAY IN THE LIFE OF A SALESMAN / WOMAN
A DAY IN THE LIFE OF A  SALESMAN / WOMANA DAY IN THE LIFE OF A  SALESMAN / WOMAN
A DAY IN THE LIFE OF A SALESMAN / WOMANIlamathiKannappan
 
Monte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMMonte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMRavindra Nath Shukla
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Servicediscovermytutordmt
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Roland Driesen
 
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...amitlee9823
 
Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfPaul Menig
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesDipal Arora
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsP&CO
 
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...rajveerescorts2022
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Dave Litwiller
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Neil Kimberley
 
Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Centuryrwgiffor
 
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...lizamodels9
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxAndy Lambert
 
Organizational Transformation Lead with Culture
Organizational Transformation Lead with CultureOrganizational Transformation Lead with Culture
Organizational Transformation Lead with CultureSeta Wicaksana
 
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...amitlee9823
 

Recently uploaded (20)

MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
 
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
Regression analysis: Simple Linear Regression Multiple Linear Regression
Regression analysis:  Simple Linear Regression Multiple Linear RegressionRegression analysis:  Simple Linear Regression Multiple Linear Regression
Regression analysis: Simple Linear Regression Multiple Linear Regression
 
A DAY IN THE LIFE OF A SALESMAN / WOMAN
A DAY IN THE LIFE OF A  SALESMAN / WOMANA DAY IN THE LIFE OF A  SALESMAN / WOMAN
A DAY IN THE LIFE OF A SALESMAN / WOMAN
 
Monte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMMonte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSM
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Service
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
 
Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...
 
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
 
Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdf
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and pains
 
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023
 
Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Century
 
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptx
 
Organizational Transformation Lead with Culture
Organizational Transformation Lead with CultureOrganizational Transformation Lead with Culture
Organizational Transformation Lead with Culture
 
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
 

속도체크

  • 1. Java, 특정 로직에 대한 성능 확인(속도 체크) 김용환
  • 2. System.currentTimeMillis() 소스 long startTime = System.currentTimeMillis();Thread.sleep(1000);long estimatedTime = System.currentTimeMillis() - startTime;System.out.println("took " + estimatedTime + " ms"); 결과 took 1000 ms
  • 3. System.nanoTime() 소스 long time1 = System.nanoTime();Thread.sleep(1000);long time2 = System.nanoTime();long timeSpent = time2 - time1;System.out.println("took " + timeSpent + " ns"); 결과 took 1000232514 ns
  • 4. Commons-lang의 StopWatch (2.3) import org.apache.commons.lang.time.StopWatch;..StopWatchstopWatch = new StopWatch();stopWatch.reset();stopWatch.start();Thread.sleep(2000);stopWatch.stop();System.out.println(stopWatch.toString());  stopWatch.reset();stopWatch.start();Thread.sleep(5000);stopWatch.stop();System.out.println(stopWatch.toString());  stopWatch.reset();stopWatch.start();Thread.sleep(3000);stopWatch.stop();System.out.println(stopWatch.toString()); 소스 0:00:02.0000:00:05.0000:00:03.000 결과
  • 5. Spring core lib에 있는 util성 StopWatch (3.0) 소스 import org.springframework.util.StopWatch;...StopWatchstopWatch = new StopWatch("Stop Watch");stopWatch.start("initializing");Thread.sleep(2000);stopWatch.stop();System.out.println("took " + stopWatch.getLastTaskTimeMillis() + " ms"); stopWatch.start("processing");Thread.sleep(5000);stopWatch.stop();System.out.println("took " + stopWatch.getLastTaskTimeMillis() + " ms");  stopWatch.start("finalizing");Thread.sleep(3000);stopWatch.stop();System.out.println("took " + stopWatch.getLastTaskTimeMillis() + " ms");  System.out.println(stopWatch.toString());System.out.println();System.out.println(stopWatch.prettyPrint());
  • 6. Spring core lib에 있는 util성 StopWatch (3.0) 결과 took 2000 mstook 5000 mstook 3001 msStopWatch 'Stop Watch': running time (millis) = 10001; [initializing] took 2000 = 20%; [processing] took 5000 = 50%; [finalizing] took 3001 = 30% StopWatch 'Stop Watch': running time (millis) = 10001-----------------------------------------ms     %     Task name-----------------------------------------02000  020%  initializing05000  050%  processing03001  030%  finalizing
  • 7. 남의 것 사용 그냥 인터넷에서 남들이 만든 StopWatch를 찾아서 copy&paste한다.http://www.devdaily.com/blog/post/java/stopwatch-class-that-can-be-used-for-timings-benchmarks
  • 8. Commons-lang의 StopWatch와 Spring Util의 StopWatch비교