You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Amelchev Nikita (Jira)" <ji...@apache.org> on 2020/02/28 15:56:00 UTC

[jira] [Created] (IGNITE-12728) The cache#putAllAsync method does not collect statistics

Amelchev Nikita created IGNITE-12728:
----------------------------------------

             Summary: The cache#putAllAsync method does not collect statistics
                 Key: IGNITE-12728
                 URL: https://issues.apache.org/jira/browse/IGNITE-12728
             Project: Ignite
          Issue Type: Bug
            Reporter: Amelchev Nikita
            Assignee: Amelchev Nikita


The cache#putAllAsync method does not collect statistics.

The reproducer for {{GridCacheAbstractMetricsSelfTest}}:
{noformat}
    @Test
    public void testPutAllAsyncAvgTime() throws Exception {
        IgniteCache<Integer, Integer> cache = grid(0).cache(DEFAULT_CACHE_NAME);

        assertEquals(0.0, cache.localMetrics().getAveragePutTime(), 0.0);
        assertEquals(0, cache.localMetrics().getCachePuts());

        Map<Integer, Integer> values = new HashMap<>();

        values.put(1, 1);
        values.put(2, 2);
        values.put(3, 3);

        IgniteFuture<Void> fut = cache.putAllAsync(values);

        fut.get();

        assertTrue(waitForCondition(() -> cache.localMetrics().getAveragePutTime() > 0, 30_000));

        assertEquals(values.size(), cache.localMetrics().getCachePuts());
    }
{noformat}




--
This message was sent by Atlassian Jira
(v8.3.4#803005)