NimblePros.Metronome
0.4.1
dotnet add package NimblePros.Metronome --version 0.4.1
NuGet\Install-Package NimblePros.Metronome -Version 0.4.1
<PackageReference Include="NimblePros.Metronome" Version="0.4.1" />
<PackageVersion Include="NimblePros.Metronome" Version="0.4.1" />
<PackageReference Include="NimblePros.Metronome" />
paket add NimblePros.Metronome --version 0.4.1
#r "nuget: NimblePros.Metronome, 0.4.1"
#:package NimblePros.Metronome@0.4.1
#addin nuget:?package=NimblePros.Metronome&version=0.4.1
#tool nuget:?package=NimblePros.Metronome&version=0.4.1
Metronome by NimblePros
A simple tool for tracking Database and Http calls per ASP.NET Core request.
Installation
Install the NuGet package:
Install-Package NimblePros.Metronome
dotnet add package NimblePros.Metronome
Usage
Refer to the samples in the samples directory.
Wire up services
builder.Services.AddMetronome();
Add Middleware
Add the middleware near the top of the pipeline. Recommended to be used only in development environment.
if (app.Environment.IsDevelopment())
{
app.UseMetronomeLoggingMiddleware();
}
EF Core Query Tracking
builder.Services.AddDbContext<ApplicationDbContext>((provider, options) =>
options.UseSqlite(connectionString) // or any other provider
.AddMetronomeDbTracking(provider)
);
HttpClient Tracking
// simple named client
builder.Services.AddHttpClient("Foo")
.AddMetronomeHandler();
// strongly typed client
builder.Services.AddScoped<IPostsService, PostsService>(); // interface is optional
builder.Services.AddHttpClient<IPostsService, PostsService>()
.ConfigureHttpClient(client =>
{
client.BaseAddress = new Uri("https://my-json-server.typicode.com/typicode/demo/");
})
.AddMetronomeHandler();
Expected Output
Log Output
When hitting individual pages or endpoints, you should see the following output in the console:
info: NimblePros.Metronome.CombinedCallLoggingMiddleware[0]
Database calls: 2, Total time: 6.4678 ms
info: NimblePros.Metronome.CombinedCallLoggingMiddleware[0]
HTTP calls: 1, Total time: 222.3137 ms
HTTP Headers
In addition, the information is added to a response header (unless configured not to do so):
Using the Information
You can use this to identify slow pages or endpoints and optimize them by adding caching, combining queries, or reducing the number of HTTP calls.
If you need help doing this in an effective way across your entire application, contact NimblePros. We do this all the time.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. |
-
net8.0
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.EntityFrameworkCore.Relational (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection (>= 8.0.0)
- Microsoft.Extensions.Http (>= 8.0.0)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on NimblePros.Metronome:
| Package | Downloads |
|---|---|
|
SU2.C15e.Infrastructure
Clean Architecture template — Infrastructure layer (EF Core interceptors for audit/event-dispatch/soft-delete/no-lock, EfRepository, AppDbContext base, Dapper IDbSession, Redis + HybridCache + DistributedLock, Kafka producer/consumer base, MongoDB.EFCore wiring, Hangfire adapters, PhenX bulk-insert for SQL Server/PostgreSQL/MySQL/SQLite/Oracle, Serilog + OpenTelemetry wiring, fake implementations of UseCases interfaces). Numeronym `C15e` = CleanArchitecture. Generation 2026 series. |
|
|
SU2.C15e.Web.Defaults
Clean Architecture template — batteries-included default host bundle for SU2.Web. Ships the AddServiceConfigs / AddOptionConfigs / AddMediatorSourceGen composition + UseAppMiddlewareAndSeedDatabase pipeline + Audit.NET HTTP middleware (UseAuditHttpMiddleware) + AddAuditHttpClient. References the meta SU2.Infrastructure so a host gets the full kitchen-sink in one reference. Lean consumers reference SU2.Web (core) + per-feature AddXxx() instead. Numeronym `C15e` = CleanArchitecture. Generation 2026 series. |
|
|
SU2.Infrastructure
Clean Architecture template — Infrastructure layer (EF Core interceptors for audit/event-dispatch/soft-delete/no-lock, EfRepository, AppDbContext base, Dapper IDbSession, Redis + HybridCache + DistributedLock, Kafka producer/consumer base, MongoDB.EFCore wiring, Hangfire adapters, PhenX bulk-insert for SQL Server/PostgreSQL/MySQL/SQLite/Oracle, Serilog + OpenTelemetry wiring, fake implementations of UseCases interfaces). Numeronym `C15e` = CleanArchitecture. Generation 2026 series. |
|
|
SU2.Web
Clean Architecture template — Web library layer (FastEndpoints BaseEndpoint base classes, InternalAuthorize, middleware: GlobalExceptionHandler/RequestCorrelation/Timeout, JsonErrorMessageResolver, CORS + Compression setup helpers, ForwardCurrentUserHandler, CurrentUser/CurrentUserOptions services, FastEndpointsErrorBuilder, ServiceConfigs + OptionConfigs + MediatorConfig + MiddlewareConfig extension methods). Numeronym `C15e` = CleanArchitecture. Generation 2026 series. |
GitHub repositories (3)
Showing the top 3 popular GitHub repositories that depend on NimblePros.Metronome:
| Repository | Stars |
|---|---|
|
ardalis/CleanArchitecture
Clean Architecture Solution Template: A proven Clean Architecture Template for ASP.NET Core 10
|
|
|
NimblePros/eShopOnWeb
Sample ASP.NET Core 10.0 reference application, powered by Microsoft, demonstrating a domain-centric application architecture with monolithic deployment model.
|
|
|
DevBetterCom/DevBetterWeb
A simple web application for devBetter
|
* Now it's on net8