[jira] [Commented] (IGNITE-6630) Incorrect time units of average transaction commit/rollback duration cache metrics.

2018-04-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on IGNITE-6630:


Github user asfgit closed the pull request at:

https://github.com/apache/ignite/pull/2854


> Incorrect time units of average transaction commit/rollback duration cache 
> metrics.
> ---
>
> Key: IGNITE-6630
> URL: https://issues.apache.org/jira/browse/IGNITE-6630
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 2.2
>Reporter: Pavel Pereslegin
>Assignee: Pavel Pereslegin
>Priority: Minor
>  Labels: metrics, newbie
> Fix For: 2.5
>
>
> AverageTxCommitTime and AverageTxRollbackTime metrics in CacheMetrics counts 
> in milliseconds instead of microseconds as pointed in javadoc.
> Simple junit reproducer:
> {code:java}
> public class CacheMetricsTxAvgTimeTest extends GridCommonAbstractTest {
> /** */
> private  CacheConfiguration cacheConfiguration(String name) {
> CacheConfiguration cacheConfiguration = new 
> CacheConfiguration<>(name);
> cacheConfiguration.setCacheMode(CacheMode.PARTITIONED);
> cacheConfiguration.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
> cacheConfiguration.setStatisticsEnabled(true);
> return cacheConfiguration;
> }
> /** */
> public void testTxCommitDuration() throws Exception {
> try ( Ignite node = startGrid(0)) {
> IgniteCache cache = 
> node.createCache(cacheConfiguration(DEFAULT_CACHE_NAME));
> try (Transaction tx = node.transactions().txStart()) {
> cache.put(1, 1);
> // Await 1 second.
> U.sleep(1_000);
> tx.commit();
> }
> // Documentation says that this metric is in microseconds.
> float commitTime = cache.metrics().getAverageTxCommitTime();
> // But this assertion will fail because it in milliseconds and 
> returns only ~1000.
> assert commitTime >= 1_000_000;
> }
> }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-6630) Incorrect time units of average transaction commit/rollback duration cache metrics.

2018-04-02 Thread Aleksey Plekhanov (JIRA)

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

Aleksey Plekhanov commented on IGNITE-6630:
---

[~xtern], looks good to me.

> Incorrect time units of average transaction commit/rollback duration cache 
> metrics.
> ---
>
> Key: IGNITE-6630
> URL: https://issues.apache.org/jira/browse/IGNITE-6630
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 2.2
>Reporter: Pavel Pereslegin
>Assignee: Pavel Pereslegin
>Priority: Minor
>  Labels: metrics, newbie
> Fix For: 2.5
>
>
> AverageTxCommitTime and AverageTxRollbackTime metrics in CacheMetrics counts 
> in milliseconds instead of microseconds as pointed in javadoc.
> Simple junit reproducer:
> {code:java}
> public class CacheMetricsTxAvgTimeTest extends GridCommonAbstractTest {
> /** */
> private  CacheConfiguration cacheConfiguration(String name) {
> CacheConfiguration cacheConfiguration = new 
> CacheConfiguration<>(name);
> cacheConfiguration.setCacheMode(CacheMode.PARTITIONED);
> cacheConfiguration.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
> cacheConfiguration.setStatisticsEnabled(true);
> return cacheConfiguration;
> }
> /** */
> public void testTxCommitDuration() throws Exception {
> try ( Ignite node = startGrid(0)) {
> IgniteCache cache = 
> node.createCache(cacheConfiguration(DEFAULT_CACHE_NAME));
> try (Transaction tx = node.transactions().txStart()) {
> cache.put(1, 1);
> // Await 1 second.
> U.sleep(1_000);
> tx.commit();
> }
> // Documentation says that this metric is in microseconds.
> float commitTime = cache.metrics().getAverageTxCommitTime();
> // But this assertion will fail because it in milliseconds and 
> returns only ~1000.
> assert commitTime >= 1_000_000;
> }
> }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-6630) Incorrect time units of average transaction commit/rollback duration cache metrics.

2018-03-30 Thread Pavel Pereslegin (JIRA)

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

Pavel Pereslegin commented on IGNITE-6630:
--

[~alex_pl]
could you take a look at this change, please?

> Incorrect time units of average transaction commit/rollback duration cache 
> metrics.
> ---
>
> Key: IGNITE-6630
> URL: https://issues.apache.org/jira/browse/IGNITE-6630
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 2.2
>Reporter: Pavel Pereslegin
>Assignee: Pavel Pereslegin
>Priority: Minor
>  Labels: metrics, newbie
> Fix For: 2.5
>
>
> AverageTxCommitTime and AverageTxRollbackTime metrics in CacheMetrics counts 
> in milliseconds instead of microseconds as pointed in javadoc.
> Simple junit reproducer:
> {code:java}
> public class CacheMetricsTxAvgTimeTest extends GridCommonAbstractTest {
> /** */
> private  CacheConfiguration cacheConfiguration(String name) {
> CacheConfiguration cacheConfiguration = new 
> CacheConfiguration<>(name);
> cacheConfiguration.setCacheMode(CacheMode.PARTITIONED);
> cacheConfiguration.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
> cacheConfiguration.setStatisticsEnabled(true);
> return cacheConfiguration;
> }
> /** */
> public void testTxCommitDuration() throws Exception {
> try ( Ignite node = startGrid(0)) {
> IgniteCache cache = 
> node.createCache(cacheConfiguration(DEFAULT_CACHE_NAME));
> try (Transaction tx = node.transactions().txStart()) {
> cache.put(1, 1);
> // Await 1 second.
> U.sleep(1_000);
> tx.commit();
> }
> // Documentation says that this metric is in microseconds.
> float commitTime = cache.metrics().getAverageTxCommitTime();
> // But this assertion will fail because it in milliseconds and 
> returns only ~1000.
> assert commitTime >= 1_000_000;
> }
> }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-6630) Incorrect time units of average transaction commit/rollback duration cache metrics.

2018-03-29 Thread Pavel Pereslegin (JIRA)

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

Pavel Pereslegin commented on IGNITE-6630:
--

Hello [~NIzhikov],
tests looks good, could you merge these changes?

> Incorrect time units of average transaction commit/rollback duration cache 
> metrics.
> ---
>
> Key: IGNITE-6630
> URL: https://issues.apache.org/jira/browse/IGNITE-6630
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 2.2
>Reporter: Pavel Pereslegin
>Assignee: Pavel Pereslegin
>Priority: Minor
>  Labels: metrics, newbie
> Fix For: 2.5
>
>
> AverageTxCommitTime and AverageTxRollbackTime metrics in CacheMetrics counts 
> in milliseconds instead of microseconds as pointed in javadoc.
> Simple junit reproducer:
> {code:java}
> public class CacheMetricsTxAvgTimeTest extends GridCommonAbstractTest {
> /** */
> private  CacheConfiguration cacheConfiguration(String name) {
> CacheConfiguration cacheConfiguration = new 
> CacheConfiguration<>(name);
> cacheConfiguration.setCacheMode(CacheMode.PARTITIONED);
> cacheConfiguration.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
> cacheConfiguration.setStatisticsEnabled(true);
> return cacheConfiguration;
> }
> /** */
> public void testTxCommitDuration() throws Exception {
> try ( Ignite node = startGrid(0)) {
> IgniteCache cache = 
> node.createCache(cacheConfiguration(DEFAULT_CACHE_NAME));
> try (Transaction tx = node.transactions().txStart()) {
> cache.put(1, 1);
> // Await 1 second.
> U.sleep(1_000);
> tx.commit();
> }
> // Documentation says that this metric is in microseconds.
> float commitTime = cache.metrics().getAverageTxCommitTime();
> // But this assertion will fail because it in milliseconds and 
> returns only ~1000.
> assert commitTime >= 1_000_000;
> }
> }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-6630) Incorrect time units of average transaction commit/rollback duration cache metrics.

2018-02-07 Thread Pavel Pereslegin (JIRA)

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

Pavel Pereslegin commented on IGNITE-6630:
--

[~NIzhikov], thank you,
I updated the link.

> Incorrect time units of average transaction commit/rollback duration cache 
> metrics.
> ---
>
> Key: IGNITE-6630
> URL: https://issues.apache.org/jira/browse/IGNITE-6630
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 2.2
>Reporter: Pavel Pereslegin
>Assignee: Pavel Pereslegin
>Priority: Minor
>  Labels: metrics, newbie
> Fix For: 2.5
>
>
> AverageTxCommitTime and AverageTxRollbackTime metrics in CacheMetrics counts 
> in milliseconds instead of microseconds as pointed in javadoc.
> Simple junit reproducer:
> {code:java}
> public class CacheMetricsTxAvgTimeTest extends GridCommonAbstractTest {
> /** */
> private  CacheConfiguration cacheConfiguration(String name) {
> CacheConfiguration cacheConfiguration = new 
> CacheConfiguration<>(name);
> cacheConfiguration.setCacheMode(CacheMode.PARTITIONED);
> cacheConfiguration.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
> cacheConfiguration.setStatisticsEnabled(true);
> return cacheConfiguration;
> }
> /** */
> public void testTxCommitDuration() throws Exception {
> try ( Ignite node = startGrid(0)) {
> IgniteCache cache = 
> node.createCache(cacheConfiguration(DEFAULT_CACHE_NAME));
> try (Transaction tx = node.transactions().txStart()) {
> cache.put(1, 1);
> // Await 1 second.
> U.sleep(1_000);
> tx.commit();
> }
> // Documentation says that this metric is in microseconds.
> float commitTime = cache.metrics().getAverageTxCommitTime();
> // But this assertion will fail because it in milliseconds and 
> returns only ~1000.
> assert commitTime >= 1_000_000;
> }
> }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-6630) Incorrect time units of average transaction commit/rollback duration cache metrics.

2018-02-05 Thread Nikolay Izhikov (JIRA)

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

Nikolay Izhikov commented on IGNITE-6630:
-

[~xtern] Looks good to me.

> Incorrect time units of average transaction commit/rollback duration cache 
> metrics.
> ---
>
> Key: IGNITE-6630
> URL: https://issues.apache.org/jira/browse/IGNITE-6630
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 2.2
>Reporter: Pavel Pereslegin
>Assignee: Pavel Pereslegin
>Priority: Minor
>  Labels: metrics, newbie
> Fix For: 2.5
>
>
> AverageTxCommitTime and AverageTxRollbackTime metrics in CacheMetrics counts 
> in milliseconds instead of microseconds as pointed in javadoc.
> Simple junit reproducer:
> {code:java}
> public class CacheMetricsTxAvgTimeTest extends GridCommonAbstractTest {
> /** */
> private  CacheConfiguration cacheConfiguration(String name) {
> CacheConfiguration cacheConfiguration = new 
> CacheConfiguration<>(name);
> cacheConfiguration.setCacheMode(CacheMode.PARTITIONED);
> cacheConfiguration.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
> cacheConfiguration.setStatisticsEnabled(true);
> return cacheConfiguration;
> }
> /** */
> public void testTxCommitDuration() throws Exception {
> try ( Ignite node = startGrid(0)) {
> IgniteCache cache = 
> node.createCache(cacheConfiguration(DEFAULT_CACHE_NAME));
> try (Transaction tx = node.transactions().txStart()) {
> cache.put(1, 1);
> // Await 1 second.
> U.sleep(1_000);
> tx.commit();
> }
> // Documentation says that this metric is in microseconds.
> float commitTime = cache.metrics().getAverageTxCommitTime();
> // But this assertion will fail because it in milliseconds and 
> returns only ~1000.
> assert commitTime >= 1_000_000;
> }
> }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-6630) Incorrect time units of average transaction commit/rollback duration cache metrics.

2017-10-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on IGNITE-6630:


GitHub user xtern opened a pull request:

https://github.com/apache/ignite/pull/2854

IGNITE-6630 Time units fix.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/xtern/ignite IGNITE-6630

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/ignite/pull/2854.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2854


commit 73cdd7c96914b3a08551f918e2214a5fdb7a4390
Author: Pereslegin Pavel 
Date:   2017-10-13T19:01:40Z

IGNITE-6630 Time units fix.




> Incorrect time units of average transaction commit/rollback duration cache 
> metrics.
> ---
>
> Key: IGNITE-6630
> URL: https://issues.apache.org/jira/browse/IGNITE-6630
> Project: Ignite
>  Issue Type: Bug
>Reporter: Pavel Pereslegin
>Assignee: Pavel Pereslegin
>Priority: Minor
>  Labels: metrics, newbie
>
> AverageTxCommitTime and AverageTxRollbackTime metrics in CacheMetrics 
> calculated in milliseconds instead of microseconds as pointed in javadoc.
> Simple junit reproducer:
> {code:java}
> public class CacheMetricsTxAvgTimeTest extends GridCommonAbstractTest {
> /** */
> private  CacheConfiguration cacheConfiguration(String name) {
> CacheConfiguration cacheConfiguration = new 
> CacheConfiguration<>(name);
> cacheConfiguration.setCacheMode(CacheMode.PARTITIONED);
> cacheConfiguration.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
> cacheConfiguration.setStatisticsEnabled(true);
> return cacheConfiguration;
> }
> /** */
> public void testTxCommitDuration() throws Exception {
> try ( Ignite node = startGrid(0)) {
> IgniteCache cache = 
> node.createCache(cacheConfiguration(DEFAULT_CACHE_NAME));
> try (Transaction tx = node.transactions().txStart()) {
> cache.put(1, 1);
> // Await 1 second.
> U.sleep(1_000);
> tx.commit();
> }
> // Documentation says that this metric is in microseconds.
> float commitTime = cache.metrics().getAverageTxCommitTime();
> // But this assertion will fail because it in milliseconds and 
> returns only ~1000.
> assert commitTime >= 1_000_000;
> }
> }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)