Skip to content
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

[Doc/Samples] Rename variables in microbenchmarks YAML samples to avoid conflict #330

Merged
merged 1 commit into from
Sep 10, 2021
Merged
Show file tree
Hide file tree
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
16 changes: 8 additions & 8 deletions docs/microbenchmarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ The following example is available at https://github.com/dotnet/crank/blob/main/
localFolder: .
project: micro.csproj
variables:
filter: "*"
job: short
arguments: --job {{job}} --filter {{filter}} --memory
filterArg: "*"
jobArg: short
arguments: --job {{jobArg}} --filter {{filterArg}} --memory
options:
benchmarkDotNet: true
```
Expand All @@ -80,13 +80,13 @@ Custom arguments can be defined at the job level, or at the scenario level. For

```yml
variables:
filter: "*"
job: short
arguments: --job {{job}} --filter {{filter}} --memory
filterArg: "*"
jobArg: short
arguments: --job {{jobArg}} --filter {{filterArg}} --memory
```

By doing this, each scenario can change the value of these variables.
More information about the available command line arguments can be found [on the BenchmarDotNet website](https://benchmarkdotnet.org/articles/guides/console-args.html)
More information about the available command line arguments can be found [on the BenchmarkDotNet website](https://benchmarkdotnet.org/articles/guides/console-args.html)

## Storing results locally

Expand All @@ -104,7 +104,7 @@ For instance to run the sockets micro-benchmarks, use this command:
> crank --config /crank/samples/micro/dotnet.benchmarks.yml --scenario Sockets --profile local
```

The file points directly to the GitHub repository, and defines a `filter` argument that will only use the expected classes. You can follow this example to target other benchmarks from this repository.
The file points directly to the GitHub repository, and defines a `filterArg` argument that will only use the expected classes. You can follow this example to target other benchmarks from this repository.

## Conclusion

Expand Down
12 changes: 6 additions & 6 deletions samples/micro/dotnet.benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ jobs:
dotnet:
source:
repository: https://github.com/dotnet/performance
branchOrCommit: master
branchOrCommit: main
project: src/benchmarks/micro/MicroBenchmarks.csproj
variables:
filter: "*"
job: short
arguments: --job {{job}} --filter {{filter}} --memory
filterArg: "*"
jobArg: short
arguments: --job {{jobArg}} --filter {{filterArg}} --memory
framework: netcoreapp3.1
options:
benchmarkDotNet: true
Expand All @@ -18,13 +18,13 @@ scenarios:
application:
job: dotnet
variables:
filter: "*LinqBenchmarks*"
filterArg: "*LinqBenchmarks*"

Sockets:
application:
job: dotnet
variables:
filter: "*SocketSendReceivePerfTest*"
filterArg: "*SocketSendReceivePerfTest*"

profiles:
local:
Expand Down
6 changes: 3 additions & 3 deletions samples/micro/micro.benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ jobs:
localFolder: .
project: micro.csproj
variables:
filter: "*"
job: short
arguments: --job {{job}} --filter {{filter}} --memory
filterArg: "*"
jobArg: short
arguments: --job {{jobArg}} --filter {{filterArg}} --memory
options:
benchmarkDotNet: true

Expand Down