Skip to content

Commit a0cff5b

Browse files
committed
Align help and README examples with release binaries
1 parent a04d47e commit a0cff5b

File tree

2 files changed

+33
-11
lines changed

2 files changed

+33
-11
lines changed

README.md

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dotnet build -c Release
2727
asynkron-profiler --cpu -- ./bin/Release/net8.0/MyApp
2828
```
2929

30-
You can also profile `dotnet run`, but it will include build/restore overhead:
30+
You can also profile `dotnet run`, but it will include build/restore and host overhead:
3131

3232
```bash
3333
asynkron-profiler --cpu -- dotnet run -c Release ./MyApp.csproj
@@ -58,19 +58,19 @@ dotnet tool install -g --add-source ./nupkg asynkron-profiler
5858
CPU profile a command:
5959

6060
```bash
61-
asynkron-profiler --cpu -- dotnet run MyProject.sln
61+
asynkron-profiler --cpu -- ./bin/Release/net8.0/MyApp
6262
```
6363

6464
Memory allocation profile (GC allocation ticks + call tree):
6565

6666
```bash
67-
asynkron-profiler --memory -- dotnet test
67+
asynkron-profiler --memory -- ./bin/Release/net8.0/MyApp
6868
```
6969

7070
Heap snapshot:
7171

7272
```bash
73-
asynkron-profiler --heap -- dotnet run path/to/app.csproj
73+
asynkron-profiler --heap -- ./bin/Release/net8.0/MyApp
7474
```
7575

7676
### Render existing traces
@@ -128,7 +128,29 @@ Outputs are written to `profile-output/` in the current working directory.
128128
## Examples
129129

130130
```bash
131-
asynkron-profiler --cpu --calltree-depth 20 -- dotnet run ./samples/MyApp/MyApp.csproj
132-
asynkron-profiler --memory --root "MyNamespace" -- dotnet test ./tests/MyApp.Tests/MyApp.Tests.csproj
131+
CPU profiling:
132+
asynkron-profiler --cpu -- ./bin/Release/net8.0/MyApp
133+
asynkron-profiler --cpu --calltree-depth 5 -- ./bin/Release/net8.0/MyApp
134+
asynkron-profiler --cpu --input ./profile-output/app.speedscope.json
135+
136+
Memory profiling:
137+
asynkron-profiler --memory -- ./bin/Release/net8.0/MyApp
138+
asynkron-profiler --memory --root "MyNamespace" -- ./bin/Release/net8.0/MyApp
139+
asynkron-profiler --memory --input ./profile-output/app.nettrace
140+
141+
Heap snapshot:
142+
asynkron-profiler --heap -- ./bin/Release/net8.0/MyApp
143+
asynkron-profiler --heap --input ./profile-output/app.gcdump
144+
145+
Render existing traces:
146+
asynkron-profiler --input ./profile-output/app.nettrace
147+
asynkron-profiler --input ./profile-output/app.speedscope.json --cpu
148+
asynkron-profiler --input ./profile-output/app.etlx --memory
149+
150+
General:
151+
asynkron-profiler --help
152+
153+
asynkron-profiler --cpu --calltree-depth 20 -- ./bin/Release/net8.0/MyApp
154+
asynkron-profiler --memory --root "MyNamespace" -- ./bin/Release/net8.0/MyApp
133155
asynkron-profiler --input ./profile-output/app.nettrace --cpu
134156
```

src/ProfileTool/Program.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ IReadOnlyList<string> GetUsageExampleLines()
2727
"Examples:",
2828
"",
2929
"CPU profiling:",
30-
" asynkron-profiler --cpu -- dotnet run MyProject.sln",
31-
" asynkron-profiler --cpu --calltree-depth 5 -- dotnet run MyProject.sln",
30+
" asynkron-profiler --cpu -- ./bin/Release/net8.0/MyApp",
31+
" asynkron-profiler --cpu --calltree-depth 5 -- ./bin/Release/net8.0/MyApp",
3232
" asynkron-profiler --cpu --input ./profile-output/app.speedscope.json",
3333
"",
3434
"Memory profiling:",
35-
" asynkron-profiler --memory -- dotnet test",
36-
" asynkron-profiler --memory --root \"MyNamespace\" -- dotnet test",
35+
" asynkron-profiler --memory -- ./bin/Release/net8.0/MyApp",
36+
" asynkron-profiler --memory --root \"MyNamespace\" -- ./bin/Release/net8.0/MyApp",
3737
" asynkron-profiler --memory --input ./profile-output/app.nettrace",
3838
"",
3939
"Heap snapshot:",
40-
" asynkron-profiler --heap -- dotnet run MyProject.sln",
40+
" asynkron-profiler --heap -- ./bin/Release/net8.0/MyApp",
4141
" asynkron-profiler --heap --input ./profile-output/app.gcdump",
4242
"",
4343
"Render existing traces:",

0 commit comments

Comments
 (0)