From 7d6544fca30b0a3115f7f69ff2eb5f8e39f52bdc Mon Sep 17 00:00:00 2001 From: benitav Date: Thu, 8 Jan 2026 15:41:46 +0200 Subject: [PATCH] Update client-sdk-references/dotnet.mdx Co-Authored-By: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> --- client-sdk-references/dotnet.mdx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/client-sdk-references/dotnet.mdx b/client-sdk-references/dotnet.mdx index 15510d05..1503a70a 100644 --- a/client-sdk-references/dotnet.mdx +++ b/client-sdk-references/dotnet.mdx @@ -518,6 +518,25 @@ var db = new PowerSyncDatabase(new PowerSyncDatabaseOptions }); ``` +## Get upload queue statistics + +Use `GetUploadQueueStats` to retrieve statistics about pending uploads in the queue. This method returns the count of operations waiting to be uploaded, and optionally the estimated size of the queue. + +```cs +using PowerSync.Common.Client; + +// Get count only (faster) +var stats = await db.GetUploadQueueStats(); +Console.WriteLine($"Pending uploads: {stats.Count}"); + +// Get count and size estimate +var statsWithSize = await db.GetUploadQueueStats(includeSize: true); +Console.WriteLine($"Pending uploads: {statsWithSize.Count}"); +Console.WriteLine($"Estimated size: {statsWithSize.Size} bytes"); +``` + +The `includeSize` parameter is optional and defaults to `false`. When set to `true`, the method calculates an estimated size of the upload queue data, which may be useful for monitoring purposes but adds a small performance overhead. + ## Supported Platforms See [Supported Platforms -> .NET SDK](/resources/supported-platforms#net-sdk).