Skip to content

Commit

Permalink
Fix bug in perf analysis sample
Browse files Browse the repository at this point in the history
  • Loading branch information
habbes committed Jan 29, 2025
1 parent f2698eb commit ffe3440
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions DotNetPerfAnalysisIntro/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,16 @@ This sample project aims to demonstrate how to analyze and improve the performan
service using Visual Studio profilers.

In this exercise we attempt to improve the latency and throughput of a simple API.

To run the load test:

```sh
cd load-tests
k6 run --vus <num_virtual_users> --duration <duration> ./basic.js
```

e.g.

```sh
k6 run --vus 200 --duration 30s ./basic.js
```
2 changes: 1 addition & 1 deletion DotNetPerfAnalysisIntro/SampleApi/DataReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static async Task<List<LocationData>> ReadDataAsync(Stream input)
}
else if (word.StartsWith("temp:"))
{
temperature = double.Parse(word.Split(':')[1]);
double.TryParse(word.Split(':')[1], out temperature);
}
}

Expand Down

0 comments on commit ffe3440

Please sign in to comment.