{"id":20838757,"url":"https://github.com/royalicing/stir","last_synced_at":"2026-04-19T16:05:30.999Z","repository":{"id":13806217,"uuid":"16502162","full_name":"RoyalIcing/stir","owner":"RoyalIcing","description":"Record time taken in your PHP website","archived":false,"fork":false,"pushed_at":"2014-05-23T11:17:23.000Z","size":172,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-18T23:42:44.258Z","etag":null,"topics":[],"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/RoyalIcing.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":"2014-02-04T04:23:45.000Z","updated_at":"2014-11-10T18:44:10.000Z","dependencies_parsed_at":"2022-09-06T14:10:18.936Z","dependency_job_id":null,"html_url":"https://github.com/RoyalIcing/stir","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/RoyalIcing%2Fstir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoyalIcing%2Fstir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoyalIcing%2Fstir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoyalIcing%2Fstir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RoyalIcing","download_url":"https://codeload.github.com/RoyalIcing/stir/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243196649,"owners_count":20251860,"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-11-18T01:11:28.140Z","updated_at":"2025-12-25T17:50:09.260Z","avatar_url":"https://github.com/RoyalIcing.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"stir\n====\n\nRecord time taken in your PHP website, and display as HTML or JSON.\n\n## Enable and disable easily\n(When stir is disabled, it falls back to safe-to-use empty functions)\n\n```php\n// For example in WordPress, only enable if an administrator user is logged in.\ndefine ('STIR_ENABLED', current_user_can('administrator'));\n```\n\n## Measure times\n```php\n// Start measuring:\nfunction displayPage() // example template function\n{\n\tstir('display page');\n\n\tdisplayHTMLHead();\n\tstirring('display page', 'html head');\n\n\tdisplayNavigation();\n\tstirring('display page', 'nav');\n\n\t$articles = retrieveLatestArticles();\n\t$articleIndex = 0;\n\tforeach ($articles as $article):\n\t\tstir('display article');\n\t\tdisplayArticle($article);\n\t\tstirred('display article');\n\t\t$articleIndex++;\n\tendforeach;\n\tstirring('display page', 'articles');\n\n\tdisplayFooter();\n\tstirring('display page', 'footer');\n\n\tdisplayHTMLEnd();\n\tstirred('display page');\n}\n```\n\n## Display recorded times in HTML\n```php\n// End of page.\nstirDisplayRecordedTimesForHTML();\n?\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n\u003c?php\n```\n\n## Display recorded times in a JSON response\n```php\n$action = 'get-user-favorites';\n$info = getInfoForUserFavorites();\n\n// The following function still works when stir is set to disabled.\nstirDisplayJSONInfo($info, $action);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froyalicing%2Fstir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froyalicing%2Fstir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froyalicing%2Fstir/lists"}