PHPackages                             asika/simple-benchmark - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. asika/simple-benchmark

ActiveConsole[CLI &amp; Console](/categories/cli)

asika/simple-benchmark
======================

PHP Simple Benchmark framework

3.1.0(2y ago)41.6k1MITPHPPHP &gt;=8.0

Since Jun 4Pushed 2y ago1 watchersCompare

[ Source](https://github.com/asika32764/php-simple-benchmark)[ Packagist](https://packagist.org/packages/asika/simple-benchmark)[ Docs](https://github.com/asika32764/php-simple-benchmark)[ RSS](/packages/asika-simple-benchmark/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (3)Versions (6)Used By (1)

PHP Simple Benchmark CLI
========================

[](#php-simple-benchmark-cli)

Installation via Composer
-------------------------

[](#installation-via-composer)

```
composer global require asika/simple-benchmark
```

Getting Started
---------------

[](#getting-started)

Type `benchmark` or `sb` in terminal.

```
sb
```

The output will be:

```
PHP Simple Benchmark Framework - version: 2.0.0-beta
------------------------------------------------------------

[sb Help]

Help of Simple Benchmark.

Usage:
  sb  [option]

Options:

  -h | --help       Display this help message.
  -q | --quiet      Do not output any message.
  -v | --verbose    Increase the verbosity of messages.
  --ansi            Set 'off' to suppress ANSI colors on unsupported terminals.

Commands:

  run       Run benchmark
  create    Create a task file.

Use `benchmark create TaskName` to generate a new task sample file to /tasks folder.

Use `benchmark run TaskFile.php [times]` to run benchmark

```

### Create a Task File

[](#create-a-task-file)

```
sb create TaskName
```

A file named `TaskName.php` will be generated to current folder.

Open `TaskName.php` you will see:

```
