You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2017/04/12 07:34:21 UTC
[50/57] [abbrv] ignite git commit: .NET: Fix cache metrics
.NET: Fix cache metrics
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/57035470
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/57035470
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/57035470
Branch: refs/heads/ignite-3477-debug
Commit: 570354702b27cd30f028430297648649d76a84fb
Parents: e319697
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Tue Apr 11 18:11:23 2017 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Tue Apr 11 18:11:23 2017 +0300
----------------------------------------------------------------------
.../Cache/CacheMetricsTest.cs | 86 +++++++++-----------
.../Apache.Ignite.Core/Cache/ICacheMetrics.cs | 80 ------------------
.../Impl/Cache/CacheMetricsImpl.cs | 60 --------------
3 files changed, 38 insertions(+), 188 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/57035470/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheMetricsTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheMetricsTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheMetricsTest.cs
index 9c29fbf..d1d6c7b 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheMetricsTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheMetricsTest.cs
@@ -154,56 +154,46 @@ namespace Apache.Ignite.Core.Tests.Cache
Assert.AreEqual(14, metrics.CacheTxCommits);
Assert.AreEqual(15, metrics.CacheTxRollbacks);
Assert.AreEqual("myCache", metrics.CacheName);
- Assert.AreEqual(16, metrics.OverflowSize);
- Assert.AreEqual(17, metrics.OffHeapGets);
- Assert.AreEqual(18, metrics.OffHeapPuts);
- Assert.AreEqual(19, metrics.OffHeapRemovals);
- Assert.AreEqual(20, metrics.OffHeapEvictions);
- Assert.AreEqual(21, metrics.OffHeapHits);
- Assert.AreEqual(22, metrics.OffHeapHitPercentage);
- Assert.AreEqual(23, metrics.OffHeapMisses);
- Assert.AreEqual(24, metrics.OffHeapMissPercentage);
- Assert.AreEqual(25, metrics.OffHeapEntriesCount);
- Assert.AreEqual(26, metrics.OffHeapPrimaryEntriesCount);
- Assert.AreEqual(27, metrics.OffHeapBackupEntriesCount);
- Assert.AreEqual(28, metrics.OffHeapAllocatedSize);
- Assert.AreEqual(29, metrics.OffHeapMaxSize);
- Assert.AreEqual(30, metrics.SwapGets);
- Assert.AreEqual(31, metrics.SwapPuts);
- Assert.AreEqual(32, metrics.SwapRemovals);
- Assert.AreEqual(33, metrics.SwapHits);
- Assert.AreEqual(34, metrics.SwapMisses);
- Assert.AreEqual(35, metrics.SwapEntriesCount);
- Assert.AreEqual(36, metrics.SwapSize);
- Assert.AreEqual(37, metrics.SwapHitPercentage);
- Assert.AreEqual(38, metrics.SwapMissPercentage);
- Assert.AreEqual(39, metrics.Size);
- Assert.AreEqual(40, metrics.KeySize);
+ Assert.AreEqual(16, metrics.OffHeapGets);
+ Assert.AreEqual(17, metrics.OffHeapPuts);
+ Assert.AreEqual(18, metrics.OffHeapRemovals);
+ Assert.AreEqual(19, metrics.OffHeapEvictions);
+ Assert.AreEqual(20, metrics.OffHeapHits);
+ Assert.AreEqual(21, metrics.OffHeapHitPercentage);
+ Assert.AreEqual(22, metrics.OffHeapMisses);
+ Assert.AreEqual(23, metrics.OffHeapMissPercentage);
+ Assert.AreEqual(24, metrics.OffHeapEntriesCount);
+ Assert.AreEqual(25, metrics.OffHeapPrimaryEntriesCount);
+ Assert.AreEqual(26, metrics.OffHeapBackupEntriesCount);
+ Assert.AreEqual(27, metrics.OffHeapAllocatedSize);
+ Assert.AreEqual(28, metrics.OffHeapMaxSize);
+ Assert.AreEqual(29, metrics.Size);
+ Assert.AreEqual(30, metrics.KeySize);
Assert.AreEqual(true, metrics.IsEmpty);
- Assert.AreEqual(41, metrics.DhtEvictQueueCurrentSize);
- Assert.AreEqual(42, metrics.TxThreadMapSize);
- Assert.AreEqual(43, metrics.TxXidMapSize);
- Assert.AreEqual(44, metrics.TxCommitQueueSize);
- Assert.AreEqual(45, metrics.TxPrepareQueueSize);
- Assert.AreEqual(46, metrics.TxStartVersionCountsSize);
- Assert.AreEqual(47, metrics.TxCommittedVersionsSize);
- Assert.AreEqual(48, metrics.TxRolledbackVersionsSize);
- Assert.AreEqual(49, metrics.TxDhtThreadMapSize);
- Assert.AreEqual(50, metrics.TxDhtXidMapSize);
- Assert.AreEqual(51, metrics.TxDhtCommitQueueSize);
- Assert.AreEqual(52, metrics.TxDhtPrepareQueueSize);
- Assert.AreEqual(53, metrics.TxDhtStartVersionCountsSize);
- Assert.AreEqual(54, metrics.TxDhtCommittedVersionsSize);
- Assert.AreEqual(55, metrics.TxDhtRolledbackVersionsSize);
+ Assert.AreEqual(31, metrics.DhtEvictQueueCurrentSize);
+ Assert.AreEqual(32, metrics.TxThreadMapSize);
+ Assert.AreEqual(33, metrics.TxXidMapSize);
+ Assert.AreEqual(34, metrics.TxCommitQueueSize);
+ Assert.AreEqual(35, metrics.TxPrepareQueueSize);
+ Assert.AreEqual(36, metrics.TxStartVersionCountsSize);
+ Assert.AreEqual(37, metrics.TxCommittedVersionsSize);
+ Assert.AreEqual(38, metrics.TxRolledbackVersionsSize);
+ Assert.AreEqual(39, metrics.TxDhtThreadMapSize);
+ Assert.AreEqual(40, metrics.TxDhtXidMapSize);
+ Assert.AreEqual(41, metrics.TxDhtCommitQueueSize);
+ Assert.AreEqual(42, metrics.TxDhtPrepareQueueSize);
+ Assert.AreEqual(43, metrics.TxDhtStartVersionCountsSize);
+ Assert.AreEqual(44, metrics.TxDhtCommittedVersionsSize);
+ Assert.AreEqual(45, metrics.TxDhtRolledbackVersionsSize);
Assert.AreEqual(true, metrics.IsWriteBehindEnabled);
- Assert.AreEqual(56, metrics.WriteBehindFlushSize);
- Assert.AreEqual(57, metrics.WriteBehindFlushThreadCount);
- Assert.AreEqual(58, metrics.WriteBehindFlushFrequency);
- Assert.AreEqual(59, metrics.WriteBehindStoreBatchSize);
- Assert.AreEqual(60, metrics.WriteBehindTotalCriticalOverflowCount);
- Assert.AreEqual(61, metrics.WriteBehindCriticalOverflowCount);
- Assert.AreEqual(62, metrics.WriteBehindErrorRetryCount);
- Assert.AreEqual(63, metrics.WriteBehindBufferSize);
+ Assert.AreEqual(46, metrics.WriteBehindFlushSize);
+ Assert.AreEqual(47, metrics.WriteBehindFlushThreadCount);
+ Assert.AreEqual(48, metrics.WriteBehindFlushFrequency);
+ Assert.AreEqual(49, metrics.WriteBehindStoreBatchSize);
+ Assert.AreEqual(50, metrics.WriteBehindTotalCriticalOverflowCount);
+ Assert.AreEqual(51, metrics.WriteBehindCriticalOverflowCount);
+ Assert.AreEqual(52, metrics.WriteBehindErrorRetryCount);
+ Assert.AreEqual(53, metrics.WriteBehindBufferSize);
Assert.AreEqual("foo", metrics.KeyType);
Assert.AreEqual("bar", metrics.ValueType);
Assert.AreEqual(true, metrics.IsStoreByValue);
http://git-wip-us.apache.org/repos/asf/ignite/blob/57035470/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICacheMetrics.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICacheMetrics.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICacheMetrics.cs
index 9117bf8..596322b 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICacheMetrics.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICacheMetrics.cs
@@ -153,14 +153,6 @@ namespace Apache.Ignite.Core.Cache
string CacheName { get; }
/// <summary>
- /// Gets number of entries that was swapped to disk.
- /// </summary>
- /// <returns>
- /// Number of entries that was swapped to disk.
- /// </returns>
- long OverflowSize { get; }
-
- /// <summary>
/// The total number of get requests to the off-heap memory.
/// </summary>
/// <returns>
@@ -265,78 +257,6 @@ namespace Apache.Ignite.Core.Cache
long OffHeapMaxSize { get; }
/// <summary>
- /// The total number of get requests to the swap.
- /// </summary>
- /// <returns>
- /// The number of gets from the swap.
- /// </returns>
- long SwapGets { get; }
-
- /// <summary>
- /// The total number of put requests to the swap.
- /// </summary>
- /// <returns>
- /// The number of puts to the swap.
- /// </returns>
- long SwapPuts { get; }
-
- /// <summary>
- /// The total number of removals from the swap.
- /// </summary>
- /// <returns>
- /// The number of removals from the swap.
- /// </returns>
- long SwapRemovals { get; }
-
- /// <summary>
- /// The number of get requests that were satisfied by the swap.
- /// </summary>
- /// <returns>
- /// The swap hits number.
- /// </returns>
- long SwapHits { get; }
-
- /// <summary>
- /// A number of get requests to that were not satisfied by the swap.
- /// </summary>
- /// <returns>
- /// The swap misses number.
- /// </returns>
- long SwapMisses { get; }
-
- /// <summary>
- /// Gets number of entries stored in swap.
- /// </summary>
- /// <returns>
- /// Number of entries stored in swap.
- /// </returns>
- long SwapEntriesCount { get; }
-
- /// <summary>
- /// Gets size of swap, in bytes.
- /// </summary>
- /// <returns>
- /// Size of swap, in bytes.
- /// </returns>
- long SwapSize { get; }
-
- /// <summary>
- /// Gets the percentage of hits on swap.
- /// </summary>
- /// <returns>
- /// The percentage of hits on swap.
- /// </returns>
- float SwapHitPercentage { get; }
-
- /// <summary>
- /// Gets the percentage of misses on swap.
- /// </summary>
- /// <returns>
- /// The percentage of misses on swap.
- /// </returns>
- float SwapMissPercentage { get; }
-
- /// <summary>
/// Gets number of non-null values in the cache.
/// </summary>
/// <returns>
http://git-wip-us.apache.org/repos/asf/ignite/blob/57035470/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheMetricsImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheMetricsImpl.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheMetricsImpl.cs
index a2f0417..53ff810 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheMetricsImpl.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheMetricsImpl.cs
@@ -74,9 +74,6 @@ namespace Apache.Ignite.Core.Impl.Cache
private readonly string _cacheName;
/** */
- private readonly long _overflowSize;
-
- /** */
private readonly long _offHeapGets;
/** */
@@ -116,33 +113,6 @@ namespace Apache.Ignite.Core.Impl.Cache
private readonly long _offHeapMaxSize;
/** */
- private readonly long _swapGets;
-
- /** */
- private readonly long _swapPuts;
-
- /** */
- private readonly long _swapRemovals;
-
- /** */
- private readonly long _swapHits;
-
- /** */
- private readonly long _swapMisses;
-
- /** */
- private readonly long _swapEntriesCount;
-
- /** */
- private readonly long _swapSize;
-
- /** */
- private readonly float _swapHitPercentage;
-
- /** */
- private readonly float _swapMissPercentage;
-
- /** */
private readonly int _size;
/** */
@@ -364,9 +334,6 @@ namespace Apache.Ignite.Core.Impl.Cache
public string CacheName { get { return _cacheName; } }
/** <inheritDoc /> */
- public long OverflowSize { get { return _overflowSize; } }
-
- /** <inheritDoc /> */
public long OffHeapGets { get { return _offHeapGets; } }
/** <inheritDoc /> */
@@ -406,33 +373,6 @@ namespace Apache.Ignite.Core.Impl.Cache
public long OffHeapMaxSize { get { return _offHeapMaxSize; } }
/** <inheritDoc /> */
- public long SwapGets { get { return _swapGets; } }
-
- /** <inheritDoc /> */
- public long SwapPuts { get { return _swapPuts; } }
-
- /** <inheritDoc /> */
- public long SwapRemovals { get { return _swapRemovals; } }
-
- /** <inheritDoc /> */
- public long SwapHits { get { return _swapHits; } }
-
- /** <inheritDoc /> */
- public long SwapMisses { get { return _swapMisses; } }
-
- /** <inheritDoc /> */
- public long SwapEntriesCount { get { return _swapEntriesCount; } }
-
- /** <inheritDoc /> */
- public long SwapSize { get { return _swapSize; } }
-
- /** <inheritDoc /> */
- public float SwapHitPercentage { get { return _swapHitPercentage; } }
-
- /** <inheritDoc /> */
- public float SwapMissPercentage { get { return _swapMissPercentage; } }
-
- /** <inheritDoc /> */
public int Size { get { return _size; } }
/** <inheritDoc /> */