https://github.com/adambien/perceptor
Java EE Performance Measuring Interceptor
https://github.com/adambien/perceptor
javaee metrics microservices performance thinjar
Last synced: 5 months ago
JSON representation
Java EE Performance Measuring Interceptor
- Host: GitHub
- URL: https://github.com/adambien/perceptor
- Owner: AdamBien
- License: apache-2.0
- Created: 2017-04-04T19:16:01.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-25T20:07:02.000Z (over 8 years ago)
- Last Synced: 2023-07-26T21:12:53.656Z (over 2 years ago)
- Topics: javaee, metrics, microservices, performance, thinjar
- Language: Java
- Size: 36.1 KB
- Stars: 19
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# perceptor
Java EE Performance Measuring Interceptor
## installation
To gather statistics without automatically exposing them use the following dependency:
```xml
com.airhacks
perceptor
[RECENT]
```
The statistics become available via injection:
```java
import com.airhacks.interceptor.monitoring.control.InvocationMonitoring;
public class MonitoringResource {
@Inject
InvocationMonitoring mes;
}
```
The `perceptor-spy` dependency gathers statistics and exposes them via
the `/monitoring/methods` endpoint:
```xml
com.airhacks
perceptor-spy
[RECENT]
```
## usage
```java
import com.airhacks.interceptor.monitoring.boundary.PerformanceSensor;
@Interceptors(PerformanceSensor.class)
public class Invoker {
public String slow() {}
public String fast() {}
}
```
## statistics API
all method invocations:
`curl [THIN_WAR]/resources/monitoring/methods`
all method invocations, sorted by timestamp:
`curl [THIN_WAR]/resources/monitoring/methods/recent`
slowest methods:
`curl [THIN_WAR]/resources/monitoring/methods/slowest`
methods throwing exceptions:
`curl [THIN_WAR]/resources/monitoring/methods/exceptional`
methods throwing exceptions, sorted by exception amount:
`curl [THIN_WAR]/resources/monitoring/methods/unstable`
See you at [Java EE Performance, Monitoring and Troubleshooting](http://workshops.adam-bien.com/performance.htm) and/or [Java EE Microservices](http://workshops.adam-bien.com/microservices.htm) workshops