{"id":18376434,"url":"https://github.com/cycle/benchmarks","last_synced_at":"2025-04-14T00:54:31.473Z","repository":{"id":46292565,"uuid":"386278299","full_name":"cycle/benchmarks","owner":"cycle","description":null,"archived":false,"fork":false,"pushed_at":"2021-11-02T14:48:01.000Z","size":141,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-27T14:55:27.363Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":null,"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/cycle.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":"2021-07-15T12:16:04.000Z","updated_at":"2024-08-20T18:33:32.000Z","dependencies_parsed_at":"2022-09-24T14:12:33.285Z","dependency_job_id":null,"html_url":"https://github.com/cycle/benchmarks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cycle%2Fbenchmarks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cycle%2Fbenchmarks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cycle%2Fbenchmarks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cycle%2Fbenchmarks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cycle","download_url":"https://codeload.github.com/cycle/benchmarks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248804783,"owners_count":21164131,"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":["hacktoberfest"],"created_at":"2024-11-06T00:23:19.213Z","updated_at":"2025-04-14T00:54:31.440Z","avatar_url":"https://github.com/cycle.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Benchmark tool for CycleORM\n\n## Benchmark tool for CycleORM\n\n```\n// Run all projects with default settings\n$ php bench run\n\n// Run each project in a separate process (Recommended)\n$ php bench run -p\n\n// Run a specific project or multiple projects\n$ php bench run v1\n$ php bench run v1 v2 \n$ php bench run eloquent8\n\n// Run with number of iterations (Overrides the value in the benchmark itself)\n$ php bench run -i 2\n\n// Run with a number of runs of each subject (Overrides the value in the benchmark itself)\n$ php bench run -r 200\n\n// Benchmark filtering on startup\n$ php bench run -f 200\n$ php bench run -f benchFoo\n$ php bench run -f HashBench::benchFoo\n$ php bench run -f Hash.*\n\n// Benchmark filtering by group on startup\n$ php bench run -g select -g persist\n\n// phpbench configuration change\n$ php bench run -c phpbench-dev.json\n\n// Run parameters can be combined\n$ php bench run -p -r 200 -i 2 -f HashBench::benchFoo -c phpbench-dev.json v1 v2\n```\n\n## Benchmark project generation\n\nProjects are generated based on the `config/projects.php` config\n\n```php\nreturn [\n    // Project name can begin with \"-\", the project will be ignored in .gitignore\n    'project_name' =\u003e [\n        'boilerplate' =\u003e 'default', // default project template (optional)\n        // composer requires\n        'require' =\u003e [\n            'cycle/orm' =\u003e '^1.5'.\n        ],\n        'locked_paths' =\u003e [ // files and directories that should not be removed by regeneration (optional)\n            'vendor',\n            'composer.json',\n            'composer.lock'\n        ],\n        // Bindings for container for all benchmarks\n        'bindings' =\u003e [\n            \\Cycle\\Benchmarks\\Base\\DatabaseDrivers\\DriverInterface::class =\u003e \\Cycle\\Benchmarks\\Base\\DatabaseDrivers\\SqliteDriver::class,\n            \\Butschster\\EntityFaker\\EntityFactoryInterface::class =\u003e \\Cycle\\Benchmarks\\Base\\EntityFactory\\CycleORMV1EntityFactory::class,\n            'Cycle\\ORM\\MapperInterface' =\u003e 'Cycle\\ORM\\Mapper\\Mapper',\n        ],\n        'benchmarks' =\u003e [\n            \\Cycle\\Benchmarks\\Base\\Benchmarks\\HasOnePersist::class =\u003e [\n                // Bindings for specific benchmarks\n                \\Cycle\\Benchmarks\\Base\\DatabaseDrivers\\DriverInterface::class =\u003e \\Cycle\\Benchmarks\\Base\\DatabaseDrivers\\NullDriver::class,\n            ],\n            \\Cycle\\Benchmarks\\Base\\Benchmarks\\SingleEntityPersist::class,\n            \\Cycle\\Benchmarks\\Base\\Benchmarks\\SingleEntitySelect::class,\n            \\Cycle\\Benchmarks\\Base\\Benchmarks\\HasManyPersist::class,\n            \\Cycle\\Benchmarks\\Base\\Benchmarks\\HasManySelect::class\n        ],\n    ]\n];\n```\n\n### Generate benchmarks\n\n```\n// Creation of projects and benchmarks which have not yet been created.\n$ php bench generate\n\n// All generated projects will be generated anew (all files of the project will be deleted, except those listed in the locked_paths)\n$ php bench generate -o\n\n// Generate only the listed projects\n$ php bench generate v1 v2\n```\n\n### View reports\n\n```\n// Retrieve last run report\n$ php bench report\n$ php bench report latest\n\n// Retrieve the previous report relative to the current one\n$ php bench report latest-1\n$ php php bench report latest-2\n$ php php bench report latest-n\n\n// Retrieve report by ID\n$ php bench report 1346426b575f15ce2a67562db9170e9fb54f3ec6\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcycle%2Fbenchmarks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcycle%2Fbenchmarks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcycle%2Fbenchmarks/lists"}