Skip to content

Commit

Permalink
Add example output to README (#23)
Browse files Browse the repository at this point in the history
* Change example code language from bash to terminal

* Add links to BenchmarkMinimalExample and BenchmarkSuiteExample

* Add example output for swift run command
  • Loading branch information
mattt committed May 14, 2020
1 parent baad2fc commit c701145
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ more details on what options are available, pass either the `-h` or `--help` com

Example:

```bash
```terminal
$ swift run -c release BenchmarkMinimalExample -h
[3/3] Linking BenchmarkMinimalExample
USAGE: benchmark-command [--allow-debug-build] [--filter <filter>] [--iterations <iterations>] [--warmup-iterations <warmup-iterations>] [--min-time <min-time>] [--max-iterations <max-iterations>]
Expand All @@ -40,10 +40,20 @@ OPTIONS:
--max-iterations <max-iterations>
Maximum number of iterations to run when automatically detecting number iterations.
-h, --help Show help information.
$ swift run -c release BenchmarkMinimalExample
running add string no capacity... done! (1795.09 ms)
running add string reserved capacity... done! (1815.80 ms)
name time std iterations
-------------------------------------------------------------------------
add string no capacity 35380.0 ns ± 5035.122635576142 38603
add string reserved capacity 37466.0 ns ± 4940.675061813501 36990
```

For more examples, see Sources/BenchmarkMinimalExample and
Sources/BenchmarkSuiteExample.
For more examples, see
[Sources/BenchmarkMinimalExample](./Sources/BenchmarkMinimalExample) and
[Sources/BenchmarkSuiteExample](./Sources/BenchmarkSuiteExample).

## Usage

Expand Down

0 comments on commit c701145

Please sign in to comment.