Skip to content

Commit

Permalink
Update docs to explain creating tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierstoval committed Nov 12, 2018
1 parent f2855d0 commit 083a920
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/vendor/
/build/
/benchmarker.phar
!/build/.gitkeep
39 changes: 36 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,44 @@ latest `benchmarker.phar` archive.
$ cd benchmarker/
$ php bin/benchmarker
```
* By building the `.phar` file manually with [Box](https://github.com/box-project/box2):
```
# Install the project in any directory via "composer create" or "git clone"
$ box build
# Find the file in build/benchmarker.phar
```

## Usage

Basically there are two ways to use it: **sequential** or **parallel** execution.
### Create tests

You can use this command to create test files:

```
$ benchmarker create test_file.php
No test names provided
Provide a name for one test (or leave empty if you have finished)::
> first test
Provide a name for one test (or leave empty if you have finished)::
> second test
Provide a name for one test (or leave empty if you have finished)::
>
[OK] Created benchmark at test_file.php
```

See [File Format](#file-format) to know what the file will look like and how to create tests in them.

### Running the tests

There are two ways to use the benchmarker: **sequential** or **parallel** execution.

### Sequential

Expand Down Expand Up @@ -75,9 +109,8 @@ return (function(){

You can see more examples in the [examples](examples) directory.


## More

More coming soon! Stay tuned 😉

This project is highly inspired by http://www.php-benchmark-script.com/ from which the source code is based a little.
This project is highly inspired by http://www.php-benchmark-script.com/ from which the source code is based.
2 changes: 1 addition & 1 deletion box.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"compression": "GZ",
"git-version": "package_version",
"main": "bin/benchmarker",
"output": "benchmarker.phar",
"output": "build/benchmarker.phar",
"chmod": "0755",
"stub": true
}
Empty file added build/.gitkeep
Empty file.

0 comments on commit 083a920

Please sign in to comment.