{"id":19773962,"url":"https://github.com/badoo/funcmap","last_synced_at":"2025-04-30T18:32:38.984Z","repository":{"id":40370707,"uuid":"240478608","full_name":"badoo/funcmap","owner":"badoo","description":"PHP extension that logs all called userspace functions/methods","archived":false,"fork":false,"pushed_at":"2024-03-06T02:17:32.000Z","size":21,"stargazers_count":39,"open_issues_count":1,"forks_count":6,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-04-20T17:45:50.956Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/badoo.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":"2020-02-14T10:02:20.000Z","updated_at":"2024-03-03T10:17:11.000Z","dependencies_parsed_at":"2022-08-09T18:42:04.804Z","dependency_job_id":null,"html_url":"https://github.com/badoo/funcmap","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/badoo%2Ffuncmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badoo%2Ffuncmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badoo%2Ffuncmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badoo%2Ffuncmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/badoo","download_url":"https://codeload.github.com/badoo/funcmap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224219555,"owners_count":17275477,"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-12T05:11:38.030Z","updated_at":"2024-11-12T05:11:38.608Z","avatar_url":"https://github.com/badoo.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## funcmap PHP extension\nProblem: how to detect unused/dead legacy functions in production code?\nSolution: collect all the functions that ARE used and remove them from the list of functions available. What's left is unused.\n\nfuncmap is a simple PHP extension that collects names of all userspace functions that's been called and writes them down to a text file from time to time.\nTo reduce the resource usage, you can limit the probability of that event.\n\n## Configuration\n* **funcmap.enabled bool** (PHP\\_INI\\_SYSTEM) - enable/disable the extension. The extension won't do anything at all if this setting is set to false. Default value: false\n* **funcmap.logfile string** (PHP\\_INI\\_ALL) - path to the logfile. File must be writable by PHP process user, otherwise you'll get an error in the logs. The filename may contain '%pid%' pattern, so that each child could write to its own file. Adding the '%pid%' pattern is strongly recommended for multiprocess PHP installations, otherwise you'll most likely end up with garbage results. Default value: \"\"\n* **funcmap.probability int** (PHP\\_INI\\_SYSTEM) - enable data collection with this probability. This is probablity in percents, so any valuu greater than 100 will be treated as 100, i.e. \"always enabled\". Setting it to a value \u003c= 0 will result in no data being written ever. Default value: 100\n* **funcmap.flush\\_interval\\_sec int** (PHP\\_INI\\_ALL) - write collected data to the disk each N seconds (and on process shutdown). Zero value means \"write on process shutdown only\" (PHP-FPM processes are shut down, for example, when they reach their request limit). Default value: 0\n\n## Example configuration\n```\nfuncmap.enabled=1                            # enable the extension\nfuncmap.logfile=/tmp/logs/funcmap_%pid%.log  # each PHP process writes to its own log file\nfuncmap.flush_interval_sec=200               # write data each 200 seconds if the process lives longer than that\nfuncmap.probability=2                        # collect data for 2% script executions only\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadoo%2Ffuncmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbadoo%2Ffuncmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadoo%2Ffuncmap/lists"}