From 673042d8e09aecc96e52da3a4242736eb7fcad57 Mon Sep 17 00:00:00 2001 From: Bob Lloyd Date: Mon, 8 Jan 2024 09:59:08 -0500 Subject: [PATCH 1/2] Bug #599 - Update documentation to reflect the correct signature of the Timing() method. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 500491a4..b14f834d 100644 --- a/README.md +++ b/README.md @@ -200,12 +200,13 @@ Given an existing instance of `IStatsDPublisher` called `stats` you can do for e ```csharp stats.Increment("DoSomething.Attempt"); var stopWatch = Stopwatch.StartNew(); +var sampleRate = 1; var success = DoSomething(); stopWatch.Stop(); var statName = "DoSomething." + success ? "Success" : "Failure"; -stats.Timing(statName, stopWatch.Elapsed); +stats.Timing(stopWatch.Elapsed, sampleRate, statName); ``` ### Simple timers From e9384c431aa31ab3a11472e0e753fe85af6414fa Mon Sep 17 00:00:00 2001 From: Bob Lloyd Date: Mon, 8 Jan 2024 10:04:42 -0500 Subject: [PATCH 2/2] Bug #599 - Remove sampleRate and define as the convenience method. --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index b14f834d..1fb35ccd 100644 --- a/README.md +++ b/README.md @@ -200,13 +200,12 @@ Given an existing instance of `IStatsDPublisher` called `stats` you can do for e ```csharp stats.Increment("DoSomething.Attempt"); var stopWatch = Stopwatch.StartNew(); -var sampleRate = 1; var success = DoSomething(); stopWatch.Stop(); var statName = "DoSomething." + success ? "Success" : "Failure"; -stats.Timing(stopWatch.Elapsed, sampleRate, statName); +stats.Timing(stopWatch.Elapsed, statName); ``` ### Simple timers