You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by aa...@apache.org on 2023/03/17 06:01:48 UTC

[rocketmq-clients] 02/02: Add more stats info

This is an automated email from the ASF dual-hosted git repository.

aaronai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-clients.git

commit 2234f70f54fd9182ac73f763283fd84053ed8b1a
Author: Aaron Ai <ya...@gmail.com>
AuthorDate: Fri Mar 17 13:49:54 2023 +0800

    Add more stats info
---
 csharp/examples/ProducerBenchmark.cs    | 2 +-
 csharp/rocketmq-client-csharp/Client.cs | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/csharp/examples/ProducerBenchmark.cs b/csharp/examples/ProducerBenchmark.cs
index 5e3d4632..2b2ff427 100644
--- a/csharp/examples/ProducerBenchmark.cs
+++ b/csharp/examples/ProducerBenchmark.cs
@@ -30,7 +30,7 @@ namespace examples
         private static readonly Logger Logger = MqLogManager.Instance.GetCurrentClassLogger();
 
         private static readonly SemaphoreSlim Semaphore = new SemaphoreSlim(0);
-        private const int TpsLimit = 300;
+        private const int TpsLimit = 1024;
         private static long _successCounter;
         private static long _failureCounter;
 
diff --git a/csharp/rocketmq-client-csharp/Client.cs b/csharp/rocketmq-client-csharp/Client.cs
index d619280b..2a2c9716 100644
--- a/csharp/rocketmq-client-csharp/Client.cs
+++ b/csharp/rocketmq-client-csharp/Client.cs
@@ -255,7 +255,9 @@ namespace Org.Apache.Rocketmq
             ThreadPool.GetAvailableThreads(out var availableWorker, out var availableIo);
             Logger.Info(
                 $"ClientId={ClientId}, ClientVersion={MetadataConstants.Instance.ClientVersion}, " +
-                $".NET Version={Environment.Version}, AvailableWorkerThreads={availableWorker}, " +
+                $".NET Version={Environment.Version}, ThreadCount={ThreadPool.ThreadCount}, " +
+                $"CompletedWorkItemCount={ThreadPool.CompletedWorkItemCount}, " +
+                $"PendingWorkItemCount={ThreadPool.PendingWorkItemCount}, AvailableWorkerThreads={availableWorker}, " +
                 $"AvailableCompletionPortThreads={availableIo}");
         }