From f32d7920433a4d2c511a19f0cc52eba00d42d472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Alcal=C3=A1?= <32104554+jpalcala@users.noreply.github.com> Date: Fri, 16 Feb 2018 11:33:54 -0600 Subject: [PATCH] Update README.md --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 808dc6595..043b4ef89 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ Repeating code and reinventing the wheel is generally considered bad practice. A * [The ArgumentParser component](#the-argumentparser-component) * [The SettingsProvider abstraction](#the-settingsprovider-abstraction) * [The Connection class](#the-connection-class) + * [The Benchmark component](#the-benchmark-component) ## Libraries We offer the Swan library in two flavors since version 0.24. Swan Lite provides basic classes and extension methods and Swan Standard (we call it Fat Swan) provides everything in Swan Lite plus Network, WinServices, DI and more. See the following table to understand the components available to these flavors of Swan. @@ -968,3 +969,20 @@ using (var cn = new Connection(client, Encoding.UTF8, "\r\n", true, 0)) var response = await cn.ReadTextAsync(); } ``` + +### The `Benchmark` component +A simple benchmarking tool that provides useful statistics about a certain piece of code. + +#### Example 1: A simple benchmark test +```csharp +//starts a test with a custom name identifier +using (Benchmark.Start("Test")) +{ + + // do some logic in here + +} + +// dump results into a string +var results = Benchmark.Dump(); +```