Tomcat Plugin

50 views
Skip to first unread message

Gérald

unread,
Feb 14, 2012, 1:57:21 PM2/14/12
to javasimon
A JavaSimon extension for Tomcat is available here:
https://github.com/gquintana/javasimon-tomcat

It contains:
- Lifecycle listener to initialize Simon manager (add JMX register
callback)
- Valve to measure HTTP request duration (without affecting
application code)
- JDBC Interceptor to measure JDBC request duration (without affecting
application code)

I tested it successfully on Tomcat 6 and 7 (and related SpringSource
tc Server 2.6), the JDBC Interceptor is available only on Tomcat 7
(http://www.tomcatexpert.com/blog/2012/01/24/using-tomcat-7-jdbc-
connection-pool-production)

See ReadMe for setup instructions.

It's alpha quality code by now. Tell me what you think...

Gérald

unread,
Feb 21, 2012, 8:32:57 AM2/21/12
to javasimon
Here are two new plugins (a.k.a Callbacks) for Simon:
* LastValuesCallback: keeps in a ring buffer (fixed size fifo list)
the last N stopwatch splits, and then compute statistics on the last
values: min, max, mean, trend (increase or decrease).
* QuantilesCallback: tries to compute median and other quantiles (the
90th percentile for exemple) using a bucket sorting system. As
interpolation is used, returned quantiles may not be 100% accurate,
but it may give some more information.
These callback may consume a bit of CPU and memory resources, but as a
(french) proverb says "one can not make an omelette without breaking
eggs".

They are in the same GIT repo:
https://github.com/gquintana/javasimon-tomcat

Gérald

unread,
Nov 1, 2012, 4:55:04 PM11/1/12
to java...@googlegroups.com
I worked a bit more on JavaSimon Tomcat extension :
  • Upgraded to latest JavaSimon release: now using StopwatchSource
  • Cleaned code and added unit tests
  • Removed quantiles/call tree calback as they are in core now
  • Readme in MarkDown format
Test it and tell me,
Gérald
Reply all
Reply to author
Forward
0 new messages