2017 © Pedro Peláez
 

library performance

Performance utility library for Hack

image

hhpack/performance

Performance utility library for Hack

  • Sunday, May 27, 2018
  • by holyshared
  • Repository
  • 1 Watchers
  • 1 Stars
  • 3 Installations
  • Hack
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 22 Versions
  • 0 % Grown

The README.md

performance

Latest Stable Version Build Status Dependency Status License, (*1)

Screen Shot, (*2)

Basic usage

You can measure the time of easy processing., (*3)

use HHPack\Performance\PerformanceWatcher;
use HHPack\Performance\TimeWatcher;
use HHPack\Performance\MemoryWatcher;
use HHPack\Performance\Result\WatchedResult;

$watcher = PerformanceWatcher::fromItems([
    Pair { 'time', new TimeWatcher() },
    Pair { 'memory', new MemoryWatcher() }
]);

$watcher->start();
$watcher->stop();

$texts = $watcher->result()->mapWithKey(($key, $result) ==> {
    return sprintf("%s: %s", $key, (string) $result->value());
})->values();

foreach ($texts as $text) {
    echo $text, PHP_EOL;
}

Benchmark

use HHPack\Performance as bench;

function sync_benchmarker() : void
{
    bench\sync()->times(10)->run(() ==> {
        usleep(2000);
    });
}
sync_benchmarker();

or, (*4)

use HHPack\Performance as bench;

async function async_benchmarker_main() : Awaitable<void>
{
    await bench\async()->times(10)->run(async () ==> {
        await \HH\Asio\usleep(2000);
    });
}

\HH\Asio\join(async_benchmarker_main());

Run the test

You can run the test with the following command., (*5)

composer install
composer test

The Versions

27/05 2018

dev-master

9999999-dev

Performance utility library for Hack

  Sources   Download

MIT

The Requires

 

The Development Requires

by Noritaka Horio

time hack timer performance memory

13/05 2018

1.2.5

1.2.5.0

Performance utility library for Hack

  Sources   Download

MIT

The Requires

 

The Development Requires

by Noritaka Horio

time hack timer performance memory

11/04 2018

1.2.4

1.2.4.0

Performance utility library for Hack

  Sources   Download

MIT

The Requires

 

The Development Requires

by Noritaka Horio

time hack timer performance memory

29/03 2018

dev-feature/hhvm3.25

dev-feature/hhvm3.25

Performance utility library for Hack

  Sources   Download

MIT

The Requires

 

The Development Requires

by Noritaka Horio

time hack timer performance memory

26/01 2018

1.2.3

1.2.3.0

Performance utility library for Hack

  Sources   Download

MIT

The Requires

 

The Development Requires

by Noritaka Horio

time hack timer performance memory

26/01 2018

dev-feature/hhvm3.24

dev-feature/hhvm3.24

Performance utility library for Hack

  Sources   Download

MIT

The Requires

 

The Development Requires

by Noritaka Horio

time hack timer performance memory

03/10 2017

1.2.2

1.2.2.0

Performance utility library for Hack

  Sources   Download

MIT

The Requires

 

The Development Requires

by Noritaka Horio

time hack timer performance memory

14/09 2017

1.2.1

1.2.1.0

Performance utility library for Hack

  Sources   Download

MIT

The Requires

 

The Development Requires

by Noritaka Horio

time hack timer performance memory

12/08 2017

1.2.0

1.2.0.0

Performance utility library for Hack

  Sources   Download

MIT

The Requires

 

The Development Requires

by Noritaka Horio

time hack timer performance memory

12/08 2017

dev-feature/namespace

dev-feature/namespace

Performance utility library for Hack

  Sources   Download

MIT

The Requires

 

The Development Requires

by Noritaka Horio

time hack timer performance memory

07/07 2017

1.1.0

1.1.0.0

Performance utility library for Hack

  Sources   Download

MIT

The Requires

  • hhvm >=3.18.0

 

The Development Requires

by Noritaka Horio

time hack timer performance memory

18/02 2017

1.0.0

1.0.0.0

Performance utility library for Hack

  Sources   Download

MIT

The Requires

  • hhvm >=3.12.0

 

The Development Requires

by Noritaka Horio

time hack timer performance memory

13/02 2016

0.6.1

0.6.1.0

Performance utility library for Hack

  Sources   Download

MIT

The Requires

  • hhvm >=3.12.0

 

The Development Requires

by Noritaka Horio

time hack timer performance memory

13/02 2016

0.6.0

0.6.0.0

Performance utility library for Hack

  Sources   Download

MIT

The Requires

  • hhvm >=3.12.0

 

The Development Requires

by Noritaka Horio

time hack timer performance memory

13/02 2016

0.5.0

0.5.0.0

Performance utility library for Hack

  Sources   Download

MIT

The Requires

  • hhvm >=3.12.0

 

The Development Requires

by Noritaka Horio

time hack timer performance memory

04/02 2016

0.4.2

0.4.2.0

Performance utility library for Hack

  Sources   Download

MIT

The Requires

  • hhvm >=3.11.0

 

The Development Requires

by Noritaka Horio

time hack timer performance memory

30/01 2016

0.4.1

0.4.1.0

Performance utility library for Hack

  Sources   Download

MIT

The Requires

 

The Development Requires

by Noritaka Horio

time hack timer performance memory

30/01 2016

0.4.0

0.4.0.0

Performance utility library for Hack

  Sources   Download

MIT

The Requires

 

The Development Requires

by Noritaka Horio

time hack timer performance memory

24/01 2016

0.3.0

0.3.0.0

Performance utility library for Hack

  Sources   Download

MIT

The Requires

  • hhvm >=3.11.0

 

The Development Requires

by Noritaka Horio

time hack timer performance memory

16/11 2015

0.2.1

0.2.1.0

Stopwatch for Hack

  Sources   Download

MIT

The Requires

  • hhvm >=3.6

 

The Development Requires

by Noritaka Horio

hack timer stopwatch

01/11 2015

0.2.0

0.2.0.0

Stopwatch for Hack

  Sources   Download

MIT

The Requires

  • hhvm >=3.6

 

The Development Requires

by Noritaka Horio

hack timer stopwatch

01/11 2015

0.1.0

0.1.0.0

Stopwatch for Hack

  Sources   Download

MIT

The Requires

  • hhvm >=3.6

 

The Development Requires

by Noritaka Horio

hack timer stopwatch