tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: svn commit: r830589 - /tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
Date Thu, 29 Oct 2009 04:54:28 GMT
2009/10/28  <markt@apache.org>:
> Author: markt
> Date: Wed Oct 28 15:30:49 2009
> New Revision: 830589
>
>
> +        if (endpoint.getCurrentThreadsBusy() >0 &&
> +                endpoint.getMaxThreads() >0) {
> +            threadRatio = (endpoint.getCurrentThreadsBusy() * 100)
> +                    / endpoint.getMaxThreads();
> +        }

I think that endpoint.getCurrentThreadsBusy() call is not cheap (and
can provide different results between calls). It would be better to
cache its result in a local variable.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message