Skip to content

[benchmark] Change the readme to consistently use the "#" heading form #26238

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

Merged
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
25 changes: 9 additions & 16 deletions benchmark/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
Swift Benchmark Suite
=====================
# Swift Benchmark Suite

This directory contains the Swift Benchmark Suite.

Running Swift Benchmarks
------------------------
## Running Swift Benchmarks

To run Swift benchmarks, pass the `--benchmark` flag to `build-script`. The
current benchmark results will be compared to the previous run's results if
Expand All @@ -16,8 +14,7 @@ impacting changes, and run the benchmarks again. Upon benchmark completion, the
benchmark results for the development branch will be compared to the most
recent benchmark results for `master`.

Building with build-script
--------------------------
## Building with build-script

By default, Swift benchmarks for OS X are compiled during the Swift build
process. To build Swift benchmarks for additional platforms, pass the following
Expand All @@ -33,8 +30,7 @@ drivers dynamically link Swift standard library dylibs from a path
relative to their run-time location (../lib/swift) so the standard
library should be distributed alongside them.

Building Independently
----------------------
## Building Independently

To build the Swift benchmarks using only an Xcode installation: install an
Xcode version with Swift support, install cmake 2.8.12, and ensure Xcode is
Expand Down Expand Up @@ -110,8 +106,7 @@ installed libraries instead, enable
This will reflect the performance of the Swift standard library
installed on the device, not the one included in the Swift root.

Using the Benchmark Driver
--------------------------
## Using the Benchmark Driver

### Usage

Expand Down Expand Up @@ -154,17 +149,15 @@ You can use test numbers instead of test names like this:
Test numbers are not stable in the long run, adding and removing tests from the
benchmark suite will reorder them, but they are stable for a given build.

Using the Harness Generator
---------------------------
## Using the Harness Generator

`scripts/generate_harness/generate_harness.py` runs `gyb` to automate generation
of some benchmarks.

** FIXME ** `gyb` should be invoked automatically during the
build so that manually invoking `generate_harness.py` is not required.

Adding New Benchmarks
---------------------
## Adding New Benchmarks

The harness generator supports both single and multiple file tests.

Expand Down Expand Up @@ -244,8 +237,8 @@ public func run_YourTestName(N: Int) {
The current set of tags are defined by the `BenchmarkCategory` enum in
`TestsUtils.swift` .

Testing the Benchmark Drivers
-----------------------------
## Testing the Benchmark Drivers

When working on tests, after the initial build
````
swift-source$ ./swift/utils/build-script -R -B
Expand Down