-
Notifications
You must be signed in to change notification settings - Fork 10
Profiler
Profiler is a simple utility class for method performance test
Profiler.run(threadNum, loopNum, repeatNum, "yourMethod", () -> {
/* call your method */}).printResult();
// call by method.
Profiler.run(instance, "yourMethod", threadNum, loopNum, repeatNum).printResult();
//call by Runnable and write result to Console with html format
Profiler.run(threadNum, loopNum, repeatNum, () -> {
/* call your method */}).writeHtmlResult(System.out);
//call by method and write result to Console with html format
Profiler.run(instance, "yourMethod", threadNum, loopNum, repeatNum).writeHtmlResult(System.out);
Here is the result with plain text format:
======================================================================================================================== (unit: milliseconds) threadNum=16; loops=100000 totalElapsedTime: 2258
, |avg time|, |min time|, |max time|, |0.01% >=|, |0.1% >=|, |1% >=|, |10% >=|, |20% >=|, |50% >=|, |80% >=|, |90% >=|, |99% >=|, |99.9% >=|, |99.99% >=| yourMethod, 0.0109, 0, 126, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
========================================================================================================================
- How to Learn/Use the APIs correctly and efficiently
- Programming in RDBMS with Jdbc/PreparedQuery/SQLExecutor/Mapper/Dao
- JSON/XML Parser
- SQLite Executor
- SQL Executor
- SQL Builder
- SQL Mapper
- DataSet
- JdbcUtil/CSVUtil
- IOUtil
- PrimitiveList
- Profiler
- Http Client
- Web Services
- Programming in Android
- Parse/Analyze/Operate (Big) Data (on N servers in parallel)
- Code Generation
- Introduction to JDBC
- Naming Convention
- Partitioning/Distribution
- SQL/NoSQL
- Model/Entity