Skip to content

Micro Library that allows temporize your java methods with different threshold.

License

Notifications You must be signed in to change notification settings

venancioromero/java-timer-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

venoty.timer

Description

Micro Library that allows temporize your java methods with different threshold and write times into file.

Installation

Add repository

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add dependency.

	<dependency>
	    <groupId>com.github.venancioromero</groupId>
	    <artifactId>java-timer-library</artifactId>
	    <version>0.1.0-RELEASE</version>
	</dependency>

Documentation

Annotate your methods with @timer annotation and enjoy!!

application.properties

  • timer.file.enable : property that activate property of write into file.
  • timer.file.name : Name of file.
  • timer.file.csv.separator : Separator of fields.

Default Values

Thresholds

By default the library have set two thresholds that are used for choice log level of trace.

LOG LEVEL --->         INFO             WARN                  ERROR

TIME(ms)  --->   0 ------------ 500 ------------ 1000 ----------------------

File

  • timer.file.enable : false
  • timer.file.name : timer.log
  • timer.file.csv.separator : ;

Optional

You can set another thresholds, remember that are miliseconds and modify default values,

public class MyClass {

    @Timer(warn = 1000,error=4000)
    public String hiWorld() {
        ·····
        ·····
    }
}

About

Micro Library that allows temporize your java methods with different threshold.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages