You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Thierry Ygé (Jira)" <ji...@apache.org> on 2019/11/04 13:03:00 UTC
[jira] [Created] (SLING-8826) RequestProgressTrackerLogFilter
minDurationMs configuration is in ms while the implementation compare it
with nanoseconds
Thierry Ygé created SLING-8826:
----------------------------------
Summary: RequestProgressTrackerLogFilter minDurationMs configuration is in ms while the implementation compare it with nanoseconds
Key: SLING-8826
URL: https://issues.apache.org/jira/browse/SLING-8826
Project: Sling
Issue Type: Bug
Components: Engine
Affects Versions: Engine 2.6.20
Reporter: Thierry Ygé
While trying to configure the RequestProgressTrackerLogFilter to track request that took longer than 2000 ms , I found out it was tracking everything still.
So I had a closer look at the code, and see that the duration returned by "rpt" variable is in nanoseconds (0), while the minDurationMs is set in milliseconds.
Thus it explain it always tracked all.
The duration value need to be converted to the milliseconds before executing the line (1)
(0) [https://github.com/apache/sling-org-apache-sling-engine/blob/master/src/main/java/org/apache/sling/engine/impl/debug/RequestProgressTrackerLogFilter.java#L168]
(1) [https://github.com/apache/sling-org-apache-sling-engine/blob/master/src/main/java/org/apache/sling/engine/impl/debug/RequestProgressTrackerLogFilter.java#L169]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)