I guess you could add a filter both before and after the filter you are interested in, have the first one stick the current time in the ServletRequest as an attribute, and the the one after the other filter can calculate how much time was spent. We don't really have any way of intercepting a filter in embedded Undertow.

Stuart

On Tue, Jan 22, 2019 at 5:47 PM Gaby Soria <soria.gaby@gmail.com> wrote:
Hi folks! 

I would really appreciate a piece of advice on how to do something. I'm working to measure the performance overhead adding the opentracing filter to a webapp
(using java-web-servlet-filter library from 
https://github.com/opentracing-contrib/java-web-servlet-filter). 

Until now, I have a test, using JMH to start to deploy and simple servlet application and start the undertow server and test it using an http client. But I want to measure in the server side without considering the networking activity. How can I do that? My test, for now, is: 

https://github.com/gsoria/jmh-examples/blob/master/jmh-examples-java-servlet-filter/src/main/java/org/sample/BenchmarkSimpleServlet.java

Thanks in advance
--
Gabriela Soria
_______________________________________________
undertow-dev mailing list
undertow-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/undertow-dev