stopwatch-manager 1.0.4

There is a newer version of this package available.
See the version list below for details.
dotnet add package stopwatch-manager --version 1.0.4
                    
NuGet\Install-Package stopwatch-manager -Version 1.0.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="stopwatch-manager" Version="1.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="stopwatch-manager" Version="1.0.4" />
                    
Directory.Packages.props
<PackageReference Include="stopwatch-manager" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add stopwatch-manager --version 1.0.4
                    
#r "nuget: stopwatch-manager, 1.0.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=stopwatch-manager&version=1.0.4
                    
Install stopwatch-manager as a Cake Addin
#tool nuget:?package=stopwatch-manager&version=1.0.4
                    
Install stopwatch-manager as a Cake Tool

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.

You can get a copy of this NuGet from the following location: https://www.nuget.org/packages/stopwatch-manager/

Product 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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.12 405 12/16/2022
1.0.11 396 12/12/2022
1.0.10 361 12/9/2022
1.0.9 362 12/8/2022
1.0.8 354 12/8/2022
1.0.7 371 12/7/2022
1.0.6 365 12/7/2022
1.0.5 378 12/7/2022
1.0.4 351 12/7/2022
1.0.3 369 12/6/2022
1.0.2 377 12/5/2022
1.0.1 386 12/5/2022
1.0.0 374 12/5/2022

- 1.0.0
Initial release
- 1.0.1
Updates to NuGet XML documentation
- 1.0.2
Automation of NuGet release notes
- 1.0.3
Added Restart(), LogStopwatchList(), and GetStopwatchKeys()