{"id":15743110,"url":"https://github.com/awilum/craft-benchmark","last_synced_at":"2025-03-13T09:32:44.134Z","repository":{"id":63755483,"uuid":"569941788","full_name":"Awilum/craft-benchmark","owner":"Awilum","description":"Simple benchmark plugin with basic benchmark functionality for Craft CMS.","archived":false,"fork":false,"pushed_at":"2022-12-12T11:28:12.000Z","size":39,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"1.x","last_synced_at":"2024-10-11T03:06:26.405Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/Awilum.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":["https://awilum.github.io/donate"]}},"created_at":"2022-11-24T01:12:43.000Z","updated_at":"2024-01-12T18:48:46.000Z","dependencies_parsed_at":"2022-11-25T10:03:12.359Z","dependency_job_id":null,"html_url":"https://github.com/Awilum/craft-benchmark","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Awilum%2Fcraft-benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Awilum%2Fcraft-benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Awilum%2Fcraft-benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Awilum%2Fcraft-benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Awilum","download_url":"https://codeload.github.com/Awilum/craft-benchmark/tar.gz/refs/heads/1.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221359335,"owners_count":16804785,"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-10-04T03:01:23.271Z","updated_at":"2024-10-24T23:04:59.273Z","avatar_url":"https://github.com/Awilum.png","language":"PHP","funding_links":["https://awilum.github.io/donate"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eBenchmark plugin for \u003ca href=\"https://github.com/craftcms\"\u003eCraft CMS\u003c/a\u003e\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg?label=License\" alt=\"License MIT\"\u003e \u003cimg alt=\"GitHub Repo stars\" src=\"https://img.shields.io/github/stars/awilum/craft-benchmark?label=Stars\"\u003e \u003cimg alt=\"GitHub forks\" src=\"https://img.shields.io/github/forks/awilum/craft-benchmark?label=Forks\"\u003e \u003ca href=\"https://hitsofcode.com\"\u003e\u003cimg alt=\"Hits of Code\" src=\"https://hitsofcode.com/github/awilum/craft-benchmark?branch=1.x\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nSimple benchmark plugin with basic functionality for benchmarking.\n\n## Requirements\n\n* **Craft CMS**: ^4.0\n* **PHP**: ^8.0\n\n## Installation\n\nTo install the plugin, follow these instructions.\n\n1. Open your terminal and go to your Craft project:\n    ```\n    cd /path/to/project\n    ```\n\n2. In your terminal run `composer require awilum/craft-benchmark`.\n\n3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Benchmark.\n\n### Usage\n\n```\n{% do benchmarkStart('fetch_news') %}\n    {% set entryQuery = craft.entries()\n    .section('news')\n    .orderBy('postDate DESC')\n    .limit(10) %}\n{% do benchmarkEnd('fetch_news') %}\n\n\nTime elapsed: {{ benchmarkSummary()['fetch_news']['time']['elapsed_formated'] }}\nMemory usage: {{ benchmarkSummary()['fetch_news']['memory']['usage_formated'] }}\n\n//=\u003e Time elapsed: 1ms\n//=\u003e Memory usage: 3.46KB\n```\n\n#### Functions\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cb\u003ePHP function\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cb\u003eTwig function\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cb\u003eDescription\u003c/b\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eAwilum\\CraftBenchmark\\benchmarkStart\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003ebenchmarkStart\u003c/td\u003e\n\u003ctd\u003eStart benchmark prob.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eAwilum\\CraftBenchmark\\benchmarkEnd\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003ebenchmarkEnd\u003c/td\u003e\n\u003ctd\u003eEnd benchmark prob.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eAwilum\\CraftBenchmark\\benchmarkDelete\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003ebenchmarkDelete\u003c/td\u003e\n\u003ctd\u003eDelete benchmark prob.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eAwilum\\CraftBenchmark\\benchmarkFlush\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003ebenchmarkFlush\u003c/td\u003e\n\u003ctd\u003eFlush benchmark prob.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eAwilum\\CraftBenchmark\\benchmarkSummary\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003ebenchmarkSummary\u003c/td\u003e\n\u003ctd\u003eGet benchmark summary.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctable\u003e\n\n## Tests\n\nRun tests\n\n```\n./vendor/bin/pest\n```\n\n## LICENSE\n[The MIT License (MIT)](https://github.com/awilum/craft-benchmark/blob/master/LICENSE.md)\nCopyright (c) [Sergey Romanenko](https://awilum.github.io/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawilum%2Fcraft-benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fawilum%2Fcraft-benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawilum%2Fcraft-benchmark/lists"}