{"id":15159612,"url":"https://github.com/jbzoo/profiler","last_synced_at":"2025-09-30T10:30:37.575Z","repository":{"id":56997300,"uuid":"53576037","full_name":"JBZoo/Profiler","owner":"JBZoo","description":"This package is abandoned and no longer maintained. We suggest using the https://github.com/phpbench/phpbench package instead.","archived":true,"fork":false,"pushed_at":"2016-08-01T05:34:47.000Z","size":17,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-17T07:57:38.658Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/phpbench/phpbench","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JBZoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-10T10:29:54.000Z","updated_at":"2023-01-28T14:13:30.000Z","dependencies_parsed_at":"2022-08-21T11:10:18.065Z","dependency_job_id":null,"html_url":"https://github.com/JBZoo/Profiler","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBZoo%2FProfiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBZoo%2FProfiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBZoo%2FProfiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBZoo%2FProfiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JBZoo","download_url":"https://codeload.github.com/JBZoo/Profiler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234724889,"owners_count":18877279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-26T21:40:50.941Z","updated_at":"2025-09-30T10:30:32.306Z","avatar_url":"https://github.com/JBZoo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JBZoo Profiler  [![Build Status](https://travis-ci.org/JBZoo/Profiler.svg?branch=master)](https://travis-ci.org/JBZoo/Profiler)      [![Coverage Status](https://coveralls.io/repos/github/JBZoo/Profiler/badge.svg?branch=master)](https://coveralls.io/github/JBZoo/Profiler?branch=master)\n\n#### Simple Profiler for PHP code and unit tests\n\n[![License](https://poser.pugx.org/JBZoo/Profiler/license)](https://packagist.org/packages/JBZoo/Profiler)   [![Latest Stable Version](https://poser.pugx.org/JBZoo/Profiler/v/stable)](https://packagist.org/packages/JBZoo/Profiler) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/JBZoo/Profiler/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/JBZoo/Profiler/?branch=master)\n\n\n## Usage\n```php\nuse JBZoo\\Profiler\\Benchmark;\n\n// Compare performance of functions\nBenchmark::compare([\n    'md5'   =\u003e function () {\n        $string = str_repeat(mt_rand(0, 9), 1024 * 1024);\n        return md5($string);\n    },\n    'sha1'  =\u003e function () {\n        $string = str_repeat(mt_rand(0, 9), 1024 * 1024);\n        return sha1($string);\n    },\n    'crc32' =\u003e function () {\n        $string = str_repeat(mt_rand(0, 9), 1024 * 1024);\n        return crc32($string);\n    },\n], array('count' =\u003e 500, 'name' =\u003e 'Hash functions'));\n\n/* Result:\n\n  ---------- Start benchmark: Hash functions  ----------\n  Running tests 500 times\n  PHP Overhead: time=58 ms; memory=0 B;\n\n  Testing 1/3 : md5 ... Done!\n  Testing 2/3 : sha1 ... Done!\n  Testing 3/3 : crc32 ... Done!\n\n  Name of test    Time, ms    Time, %     Memory    Memory, %\n  crc32              1 551          ~    1.25 MB            ~\n  md5                1 938         25    1.25 MB            ~\n  sha1               2 776         79    1.25 MB            ~\n\n  TOTAL TIME: 6 547.37 ms/4.36 ms;   MEMO: 41.05 KB/0.03 KB;   COUNT: 1 500\n  ---------- Finish benchmark: Hash functions  ----------\n*/\n\nBenchmark::run(function () {\n      $string = str_repeat(mt_rand(0, 9), 1024 * 1024);\n      return md5($string);\n  }, ['count' =\u003e 1000]),\n\n```\n\n\n## Unit tests and check code style\n```sh\nmake\nmake test-all\n```\n\n\n### License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbzoo%2Fprofiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjbzoo%2Fprofiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbzoo%2Fprofiler/lists"}