Skip to content

Update getting-started.md #1568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions docs/articles/guides/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

To get started with BenchmarkDotNet, please follow these steps.

## Step 1. Installation
## Step 1. Create a project
Create a new console application.

## Step 2. Installation

Install BenchmarkDotNet via the NuGet package: [BenchmarkDotNet](https://www.nuget.org/packages/BenchmarkDotNet/)

Expand All @@ -12,8 +15,8 @@ PM> Install-Package BenchmarkDotNet

Read more about BenchmarkDotNet NuGet packages: @docs.nuget

## Step 2. Design a benchmark
Create a new console application, write a class with methods that you want to measure and mark them with the `Benchmark` attribute. In the following example, we
## Step 3. Design a benchmark
Write a class with methods that you want to measure and mark them with the `Benchmark` attribute. In the following example, we
compare [MD5](https://en.wikipedia.org/wiki/MD5) and [SHA256](https://en.wikipedia.org/wiki/SHA-2) cryptographic hash functions:

```cs
Expand Down Expand Up @@ -57,7 +60,7 @@ namespace MyBenchmarks

The `BenchmarkRunner.Run<Md5VsSha256>()` call runs your benchmarks and print results to console output.

## Step 3. View results
## Step 4. View results
View the results. Here is an example of output from the above benchmark:

```ini
Expand All @@ -74,7 +77,7 @@ Frequency=2143476 Hz, Resolution=466.5319 ns, Timer=TSC
| Md5 | 25.8010 us | 0.1757 us | 113 B |


## Step 4. Analyze results
## Step 5. Analyze results

Analyze it. In your bin directory, you can find a lot of useful files with detailed information. For example:

Expand All @@ -88,4 +91,4 @@ Analyze it. In your bin directory, you can find a lot of useful files with detai
BenchmarkDotNet provides a lot of features which help to high-quality performance research.
If you want to know more about BenchmarkDotNet features, checkout the [Overview](../overview.md) page.
If you want have any questions, checkout the [FAQ](../faq.md) page.
If you didn't find answer for your question on this page, [ask it on gitter](https://gitter.im/dotnet/BenchmarkDotNet) or [create an issue](https://github.com/dotnet/BenchmarkDotNet/issues).
If you didn't find answer for your question on this page, [ask it on gitter](https://gitter.im/dotnet/BenchmarkDotNet) or [create an issue](https://github.com/dotnet/BenchmarkDotNet/issues).