{"id":17914198,"url":"https://github.com/knadh/profiler","last_synced_at":"2025-07-14T06:41:20.065Z","repository":{"id":38833414,"uuid":"504183590","full_name":"knadh/profiler","owner":"knadh","description":"A simple wrapper over Go runtime/pprof for running multiple concurrent profiles and dumping results to files.","archived":false,"fork":false,"pushed_at":"2024-07-23T05:43:38.000Z","size":9,"stargazers_count":32,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-19T00:17:59.217Z","etag":null,"topics":["pprof","profiler","profiling","profiling-library"],"latest_commit_sha":null,"homepage":"","language":"Go","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/knadh.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}},"created_at":"2022-06-16T14:17:22.000Z","updated_at":"2024-09-13T12:33:26.000Z","dependencies_parsed_at":"2024-10-28T19:56:53.317Z","dependency_job_id":null,"html_url":"https://github.com/knadh/profiler","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knadh%2Fprofiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knadh%2Fprofiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knadh%2Fprofiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knadh%2Fprofiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/knadh","download_url":"https://codeload.github.com/knadh/profiler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245186438,"owners_count":20574551,"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":["pprof","profiler","profiling","profiling-library"],"created_at":"2024-10-28T19:56:48.104Z","updated_at":"2025-03-23T23:30:45.643Z","avatar_url":"https://github.com/knadh.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://zerodha.tech\"\u003e\u003cimg src=\"https://zerodha.tech/static/images/github-badge.svg\" align=\"right\" /\u003e\u003c/a\u003e\n\n# profiler\n\nprofiler is a tiny wrapper around runtime/pprof for easily profiling Go programs. It allows running one or more profiles (cpu, mem etc.) simultaneously while avoiding boilerplate. The results are dumped to files. This is a rewrite of [pkg/profile](https://github.com/pkg/profile/) with the key difference of supporting multiple concurrent profiles.\n\n## Install\n```shell\ngo get github.com/knadh/profiler\n````\n\n## Usage\n```go\nimport \"github.com/knadh/profiler\"\n\nfunc main() {\n\t// Pass one or more modes: Block, Cpu, Goroutine, Mem, Mutex, ThreadCreate, Trace ...\n\tp := profiler.New(profiler.Conf{}, profiler.Cpu, profiler.Mem)\n\tp.Start()\n\n\t// Stuff ...\n\n\tp.Stop()\n}\n```\n\n### Optional config\n```go\nprofiler.Conf{\n\t// Directory path to dump the profile output to. Default is current directory.\n\tDirPath string\n\n\t// Quiet disables info log output.\n\tQuiet bool\n\n\t// NoShutdownHook controls whether the profiling package should\n\t// hook SIGINT to automatically Stop().\n\tNoShutdownHook bool\n\n\t// MemProfileRate is the rate for the memory profiler. Default is 4096.\n\t// To include every allocated block in the profile, set MemProfileRate to 1.\n\tMemProfileRate int\n\n\t// MemProfileType = heap or alloc. Default is heap.\n\tMemProfileType string\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknadh%2Fprofiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknadh%2Fprofiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknadh%2Fprofiler/lists"}