[ 
https://issues.apache.org/jira/browse/IGNITE-15666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17449210#comment-17449210
 ] 

Vyacheslav Koptilin commented on IGNITE-15666:
----------------------------------------------

> Citation from spec: _The following table outlines the cache operations affect 
> the statistics {*}counters{*}._
_getAverageRemoveTime()_ returns the same _counter._  _getAverageRemoveTime() 
and_ _getCacheRemovals()_ both of them are statistic counters.
for example, method _CacheStatisticsMXBean#clear()_ in according Javadoc: 
_Clears the statistics counters to 0 for the associated Cache_ including time 
counters as well!

> So what?
It was my question, Ivan :) Why EhCache should tell something. Yep, perhaps, 
the specification is not enough clear in that aspect.
The goal is to have consistency between the implementation of 
_getCacheRemovals()_ and {_}getAverageRemovalTime(){_}.
Let's assume that you executed the remove method 5 times (1 existing key, and 4 
not existing keys). each execution takes 100 ms.
In that case: getCacheRemovals() returns 1, getAverageRemovalTime() returns 500 
ms (just because there is only one successful remove).
It looks weird to me, the average time is greater than any remove request! So, 
this counter is absolutely useless.

> The remove metric value is different for sync and async methods
> ---------------------------------------------------------------
>
>                 Key: IGNITE-15666
>                 URL: https://issues.apache.org/jira/browse/IGNITE-15666
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Amelchev Nikita
>            Assignee: Amelchev Nikita
>            Priority: Major
>             Fix For: 2.12
>
>         Attachments: screenshot-1.png
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The remove metric value is different for sync and async methods.
> The following metrics are updated only if the key was exist for the sync 
> version:
> {noformat}
> RemoveTimeTotal
> RemoveTime
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to