[
https://issues.apache.org/jira/browse/SLING-11618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Carsten Ziegeler reopened SLING-11618:
--------------------------------------
I think there is something wrong with the changes. This is the diff to the
latest release and with that getTimePerCall() is now returning a value which is
the previous value divided by 1 million (1000 * 1000) which sounds not correct
{noformat}
diff --git
a/src/main/java/org/apache/sling/engine/impl/filter/FilterHandle.java
b/src/main/java/org/apache/sling/engine/impl/filter/FilterHandle.java
index 3e713a0..3e79e7d 100644
--- a/src/main/java/org/apache/sling/engine/impl/filter/FilterHandle.java
+++ b/src/main/java/org/apache/sling/engine/impl/filter/FilterHandle.java
@@ -50,7 +50,7 @@ public class FilterHandle implements Comparable<FilterHandle>
{
this.order = order;
this.orderSource = orderSource;
this.calls = new AtomicLong();
- this.time = new AtomicLong();
+ this.time = new AtomicLong(); // unit is microseconds
this.mbean = mbean;
}
@@ -81,18 +81,30 @@ public class FilterHandle implements
Comparable<FilterHandle> {
return calls.get();
}
+ /**
+ * get the total duration to process this filter
+ * @return duration in miliseconds
+ */
public long getTime() {
- return time.get();
+ return time.get()/1000 ;
}
+ /**
+ * get the average duration per call of this filter
+ * @return the average duration in microseconds
+ */
public long getTimePerCall() {
- return (getCalls() > 0) ? (1000L * getTime() / getCalls()) : -1;
+ return (getCalls() > 0) ? (getTime() / getCalls()) : -1;
}
{noformat}
> Webconsole: FilterStatus prints timings with wrong unit
> --------------------------------------------------------
>
> Key: SLING-11618
> URL: https://issues.apache.org/jira/browse/SLING-11618
> Project: Sling
> Issue Type: Improvement
> Components: Engine
> Affects Versions: Engine 2.12.0
> Reporter: Joerg Hoh
> Assignee: Joerg Hoh
> Priority: Major
> Fix For: Engine 2.13.0
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> With the changes in SLING-10582 the filter timing was changed to be recorded
> in microseconds as well, while the Webconsole Plugin still expects
> miliseconds.
> This should be fixed, the unit should still be microseconds.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)