Skip to content

Commit

Permalink
Rename variables in microbenchmarks YAML samples (dotnet#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
corrieriluca authored Sep 10, 2021
1 parent ddb6b3e commit ca570b5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
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

0 comments on commit ca570b5

Please sign in to comment.