Hi Michael
This is not impossible, but it's not easy either right now -
especially not for minimal Splits.
Firstly - I don't know what version of Simon you're using, that is
important to know for me.
I guess you're talking about HTTP requests, hence about
SimonServletFilter. There is one crucial method that can be
overridden:
protected boolean shouldBeReported(HttpServletRequest request, long
requestNanoTime, List<Split> splits) {...
That one decided whether you ask "reporter" to report your requests
with all its splits. Tricky part here is that you only know the time,
and you can't easily say whether it is minimum time. So you can go for
option to report everything - override the filter, use your class
instead of default SimonServletFilter in your web.xml and you're
halfway done. The second step is the reporter.
You may want to override
org.javasimon.javaee.reqreporter.RequestReporter#reportRequest, to
make your life easier, again extend from existing class - like
PlainRequestReporter. In your code you can compare the requestSplit
with its stopwatch min/max values, something like:
Stopwatch requestStopwatch = requestSplit.getStopwatch();
if (requestStopwatch.getMax() == requestSplit.runningFor()) {
requestStopwatch.setAttribute("maxSplit", requestSplit);
}
// and the same for min
This way you keep your min/max split in stopwatch's attributes, which
is around much longer than kinda transient splits are. This is per URL
- various stopwatches for various URLs. If you want some global
stopwatch, simply get it like:
Stopwatch globalHttpStopwatch =
simonServletFilter.getManager().getStopwatch("global");
Now when your split is stored in attribute, you can store list of all
splits from that request the same way into another attribute, either
on the stopwatch or in some attribute of that request split...
actually at this moment it's completely up to you what you will do
with the data.
Cheers
Virgo
> --
> You received this message because you are subscribed to the Google Groups
> "javasimon" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
javasimon+...@googlegroups.com.
> To post to this group, send email to
java...@googlegroups.com.
> Visit this group at
http://groups.google.com/group/javasimon.
> For more options, visit
https://groups.google.com/d/optout.