Get live throughput statistics of your NServiceBus endpoint performance.
NServiceBus | NServiceBus.SimpleStatistics | Target |
---|---|---|
v5.x | v1.x | net452 |
v6.x | v2.x | net452 |
v7.x | v3.x | net452 / netstandard2.0 |
Please note that there might be versions targeting other NServiceBus versions. Please check the Releases for all versions. or check the root of the default branch of the repository.
The following features are provided:
The detailed statistics shows statistics for various fixed periods.
The statistics are:
The fixed periods are:
Avg
)Tot
)Cur
)Max
)Note that the interval is configuration but it is not possible to define multiple custom reporting intervals.
The following is an example of the statistics written to the log at each reporting interval:
Avg> Success: 5 (100,00%), Failure: 0 ( 0,00%) Total: 5 Period: 0:00:00:01,0000000 Duration: 198,90µs
Tot> Success: 1.479 (100,00%), Failure: 0 ( 0,00%) Total: 1.479 Period: 0:00:04:15,1140000 Duration: 171,55µs
Cur> Success: 0 ( 0,00%), Failure: 0 ( 0,00%) Total: 0 Period: 0:00:00:01,0000000 Duration: NaNµs
Max> Success: 51 (100,00%), Failure: 0 ( 0,00%) Total: 51 Period: 0:00:00:00,0000000 Duration: 141,87µs
Uptime: 00:04:15.1140000
Note that lines in log file are prefixed with timestamp and logger name.
Install the NuGet package NServiceBus.SimpleStatistics
Install-Package NServiceBus.Community.SimpleStatistics
Note that the package name contains Community.
as Particular Software has enabled package suffic protection on NuGet.org
The assembly can be deployed without requiring to recompile. Recompile the process and the component will automatically be enabled by NServiceBus.
Settings can be configured via the app.config
app settings;
<appSettings>
<add key="NServiceBus/SimpleStatistics/OutputConsoleTitle" value="True"/>
<add key="NServiceBus/SimpleStatistics/OutputLog" value="True"/>
<add key="NServiceBus/SimpleStatistics/IntervalMilliSeconds" value="15000"/>
</appSettings>
Default: False (Disabled)
The OutputConsoleTitle
settings controls if every report interval statistics will be updated in the console title.
The logic will append | Avg:{0:N}/s Last:{1:N}/s, Max:{2:N}/s
to the existing title.
Note that if the title is updated with a different name that the title will be reset with the value used at startup.
Default: True (Enabled)
The OutputLog
settings controls if every report interval statistics will be logged.
Default: 3600000 (Hourly)
The IntervalMilliSeconds
setting controls the reporting interval.