{"id":19591913,"url":"https://github.com/catalyst/moodle-tool_excimer","last_synced_at":"2025-07-12T12:12:24.123Z","repository":{"id":40372500,"uuid":"374510026","full_name":"catalyst/moodle-tool_excimer","owner":"catalyst","description":"A Moodle tool to find bottlenecks in your code safely in production","archived":false,"fork":false,"pushed_at":"2025-04-14T05:26:55.000Z","size":799,"stargazers_count":13,"open_issues_count":45,"forks_count":12,"subscribers_count":21,"default_branch":"MOODLE_403_STABLE","last_synced_at":"2025-04-14T06:30:33.675Z","etag":null,"topics":["moodle","moodle-plugin","profiler","profiling"],"latest_commit_sha":null,"homepage":"https://moodle.org/plugins/tool_excimer","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/catalyst.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-06-07T02:18:07.000Z","updated_at":"2025-04-14T05:26:59.000Z","dependencies_parsed_at":"2024-03-15T07:47:24.792Z","dependency_job_id":"f54b70a3-5d8c-4eae-9434-785336a79ae4","html_url":"https://github.com/catalyst/moodle-tool_excimer","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/catalyst%2Fmoodle-tool_excimer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catalyst%2Fmoodle-tool_excimer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catalyst%2Fmoodle-tool_excimer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catalyst%2Fmoodle-tool_excimer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/catalyst","download_url":"https://codeload.github.com/catalyst/moodle-tool_excimer/tar.gz/refs/heads/MOODLE_403_STABLE","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251154606,"owners_count":21544527,"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":["moodle","moodle-plugin","profiler","profiling"],"created_at":"2024-11-11T08:31:44.213Z","updated_at":"2025-04-27T14:33:31.500Z","avatar_url":"https://github.com/catalyst.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![ci](https://github.com/catalyst/moodle-tool_excimer/actions/workflows/ci.yml/badge.svg?branch=MOODLE_403_STABLE)](https://github.com/catalyst/moodle-tool_excimer/actions/workflows/ci.yml?branch=MOODLE_403_STABLE)\n\n\n# moodle-tool_excimer\n\n- [moodle-tool\\_excimer](#moodle-tool_excimer)\n  - [What is this plugin?](#what-is-this-plugin)\n  - [What this plugin is not](#what-this-plugin-is-not)\n  - [Design principles](#design-principles)\n    - [1) Do no harm](#1-do-no-harm)\n    - [2) Don't make me think](#2-dont-make-me-think)\n    - [3) Auto tune configuration](#3-auto-tune-configuration)\n    - [4) It's always current](#4-its-always-current)\n  - [Branches](#branches)\n  - [Installation](#installation)\n    - [PHP Extension](#php-extension)\n      - [Using apt](#using-apt)\n      - [Using PECL](#using-pecl)\n    - [Moodle Plugin](#moodle-plugin)\n  - [Applying core patches](#applying-core-patches)\n      - [Moodle 3.5 - 4.0:](#moodle-35---40)\n  - [Troubleshooting](#troubleshooting)\n  - [Usage](#usage)\n  - [Support](#support)\n  - [Credits](#credits)\n\n## What is this plugin?\n\nThis is a Moodle admin plugin that provides developers with insights into not\nonly what pages in your site are slow, but why. It uses the the Excimer sampling\nphp profiler to so.\n\nIt is complementary to the profiler in core which uses Tideways. The key downside\nto Tideway is that it has a substantial performance hit and can't be used in\nproduction to capture everything and only later decide what to keep or analyse.\n\nLooking at your web server logs tells you what is slow but not why. Using Tideways\nis a critical tool if you can reproduce an issue, but cannot be used to say why\nsomething was slow retrospecively last Friday out of hours and you only found out\na few days later.\n\n![image](https://user-images.githubusercontent.com/46659321/122533874-59b15400-d065-11eb-833c-cd6d00ffbf1c.png)\n\n\n## What this plugin is not\n\nThis plugin does not aim to replace the core Tideways based profiler, they are complimentary.\n\nBecause Tideways instruments every single call, it can be used for a variety of\nthings that Excimer cannot, such as determining in production if a particular code\npath was executed or not.\n\nThis plugin does also not aim to be a full Application performance management (APM)\nsolution such as New Relic. But if you don't have or cannot afford an APM this\nplugin should be another great tool to have in your tool box.\n\n\n## Design principles\n\n### 1) Do no harm\n\nThis plugin is designed to be running constantly in production profiling everything and\nonly storing things which are of interest in various ways. So it is critical that this\nplugin has an extremely low foot print, in all dimensions: CPU, memory, and with IO to\nthe DB, file system and even caches. In the vast majority of requests when things are\nrunning smoothly it will discard the profile and it's overall impact should be close\nto zero. Even when it is storing and processing profiles, keep the impact as low as\npossible and defer things until needed if possible or worse case to a cron task.\n\nAn extension of this is 'don't escalate', meaning if something fundamentally goes wrong\nat a low level inf level, then avoid making things worse. \n\n### 2) Don't make me think\n\nRather that a low level tool which you have to drive, the intent of this plugin is to\ngive clear actionable suggestions about specific changes to code to improve it. There\nmay be many potential reasons why a particular request is 'interesting' in some way.\n\nThis plugin aims to detect a range of opportunities to improve performance such as:\n\n* when a session lock is held too long without session changes\n* when a session may be a readonly candidate\n* when buffering might be better turned off\n* when http headers, or a partial body, should be sent earlier\n* and diagnoising slow pages retrospectively\n* slow cron tasks\n* and this list will evolve over time\n\n### 3) Auto tune configuration\n\nThe idea is that this plugin starts with sensible defaults that should work for a\nwide range of environments and as it records details around your sites performance it\nadjusts to show you the most relevant things.\n\n### 4) It's always current\n\nIf you had a bad event 6 months ago and things have been running fine, that information\nis less relevant that something last night which wasn't as extreme but still worth knowing\nabout. As you make changes improvements to code it should be smart enough to prioritise\nwhat matters.\n\n\n## Moodle supported branches\n\n| version    | Branch           | PHP   | Excimer    |\n|-------------------|------------------|-------|------------|\n| Moodle 4.3+       | MOODLE_403_STABLE | 8.1  | 2024110100 |\n| Moodle 3.5-4.2    | MOODLE_35_STABLE  | 7.1+ | 1.0.2+     |\n\n## Totara supported branches\n\n| version    | Branch           | PHP   | Excimer    |\n|-------------------|------------------|-------|------------|\n| Totara 10-18    | MOODLE_35_STABLE  | 7.1+ | 1.0.2+     |\n| Totara 19       | TOTARA_19  | 8.1+ | 1.0.2+     |\n\n## Installation\n\n### PHP Extension\n\nDetails on the php extension are here:\n\nhttps://www.mediawiki.org/wiki/Excimer\n\n#### Using apt\n\n```sh\nsudo apt install php-excimer\n```\n\n#### Using PECL\n\n```sh\npecl install excimer\ndocker-php-ext-enable excimer\n```\n\n### Moodle Plugin\n\nFrom Moodle siteroot:\n\n```\ngit clone git@github.com:catalyst/moodle-tool_excimer.git admin/tool/excimer\n```\n\nThen login as admin (it should detect the extension), and click through the upgrade process.\n## Applying core patches\n\nFor Moodle versions lower than 4.1 this plugin requires Moodle tracker MDL-75014 to be backported to maintain the plugin functionality.\n#### Moodle 3.5 - 4.0:\nApply the patch:\n\u003cpre\u003e\ngit am --whitespace=nowarn \u003c admin/tool/excimer/patch/MOODLE_35_STABLE.diff\n\u003c/pre\u003e\n## Troubleshooting\n\n**ExcimerProfiler class does not exist**.\nIf you use containers, and install the package via apt/PECL, you may see this error. When this happens, you may need to stop and start up the container again, as it sometimes does not load installed packages fully whilst running, and afterwards it should work.\n\n## Usage\nWhen auto profiling is enabled, profiling will happen automatically when request exceeds the Minimum request duration (for webservice or webpage requests) or Task min duration (for adhoc and scheduled tasks)\n\nHowever profiling can be forced by specifing the `FLAMEME` parameter. \n\nFor example:\n- Via web: `/course/view.php?id=1\u0026FLAMEME=1`\n- Via CLI: `export FLAMEME=1 \u0026\u0026 php admin/cli/upgrade.php`\n\n## Support\n\nIf you find code issues please log them in GitHub here\n\nhttps://github.com/catalyst/moodle-tool_excimer/issues\n\nPlease note our time is limited, so if you need urgent support or want to\nsponsor a new feature then please contact Catalyst IT Australia:\n\nhttps://www.catalyst-au.net/contact-us\n\n\n## Credits\n\nThanks in particular to the to the Wikimedia Foundation for building the awesome Excimer profiler:\n\nhttps://github.com/wikimedia/php-excimer/\n\n\nThis plugin was developed by Catalyst IT Australia:\n\nhttps://www.catalyst-au.net/\n\n\u003cimg alt=\"Catalyst IT\" src=\"https://cdn.rawgit.com/CatalystIT-AU/moodle-auth_saml2/master/pix/catalyst-logo.svg\" width=\"400\"\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatalyst%2Fmoodle-tool_excimer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcatalyst%2Fmoodle-tool_excimer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatalyst%2Fmoodle-tool_excimer/lists"}