stopwatch-manager
1.0.0
See the version list below for details.
dotnet add package stopwatch-manager --version 1.0.0
NuGet\Install-Package stopwatch-manager -Version 1.0.0
<PackageReference Include="stopwatch-manager" Version="1.0.0" />
paket add stopwatch-manager --version 1.0.0
#r "nuget: stopwatch-manager, 1.0.0"
// Install stopwatch-manager as a Cake Addin #addin nuget:?package=stopwatch-manager&version=1.0.0 // Install stopwatch-manager as a Cake Tool #tool nuget:?package=stopwatch-manager&version=1.0.0
Stopwatch Manager for .NET
Have you ever had to record timings for a multi-threaded application and realized you needed to record the length of so many events that you actually need a collection of stopwatches instead of a single stopwatch? Yeah, me too.
That's why I developed the Stopwatch Manager for .NET. The package supports .NET 6 & 7, and it creates a concurrent dictionary of stopwatches, each with its own unique key for lookup.
Simply start a new stopwatch with a unique key name you haven't previously used, and a stopwatch gets added to the collection and is started. Stop, reset, or remove any stopwatch using the same key you used to start it.
The stopwatch manager supports Microsoft.Extensions.Logging and Serilog loggers and, by default, logs when a stopwatch is started or stopped. Elapsed time is logged when the watch is stopped, by default.
There are also options to suppress logging, as stopping a stopwatch also returns the elapsed time via an out TimeSpan parameter.
This may not be a library you'll ship to production, but it will help you get to production faster by allowing complex time recordings for operations you perform in your source code.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Microsoft.Extensions.Logging (>= 6.0.0)
- Serilog (>= 2.12.0)
-
net7.0
- Microsoft.Extensions.Logging (>= 7.0.0)
- Serilog (>= 2.12.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
- 1.0.0
Initial release