{"id":38414369,"url":"https://github.com/tommsawyer/collect","last_synced_at":"2026-01-17T04:06:18.420Z","repository":{"id":96461375,"uuid":"417505143","full_name":"tommsawyer/collect","owner":"tommsawyer","description":"collect all pprof profiles with one command","archived":false,"fork":false,"pushed_at":"2023-06-25T09:35:58.000Z","size":19,"stargazers_count":21,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-06-19T05:45:38.622Z","etag":null,"topics":["golang","pprof"],"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/tommsawyer.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":"2021-10-15T13:14:17.000Z","updated_at":"2024-03-14T20:00:54.000Z","dependencies_parsed_at":"2024-06-19T05:21:04.783Z","dependency_job_id":"ffe78dc9-6326-4563-9323-57b5d2171cd7","html_url":"https://github.com/tommsawyer/collect","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tommsawyer/collect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommsawyer%2Fcollect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommsawyer%2Fcollect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommsawyer%2Fcollect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommsawyer%2Fcollect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tommsawyer","download_url":"https://codeload.github.com/tommsawyer/collect/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommsawyer%2Fcollect/sbom","scorecard":{"id":892947,"data":{"date":"2025-08-11","repo":{"name":"github.com/tommsawyer/collect","commit":"60cefeb611ac88e7be2ad8b950f26d644d5a25ae"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":1,"reason":"Found 2/16 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codecov.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/tommsawyer/collect/codecov.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codecov.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/tommsawyer/collect/codecov.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/tommsawyer/collect/lint.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/tommsawyer/collect/lint.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/tommsawyer/collect/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/tommsawyer/collect/test.yml/main?enable=pin","Warn: downloadThenRun not pinned by hash: .github/workflows/codecov.yml:19","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/codecov.yml:1","Warn: no topLevel permission defined: .github/workflows/lint.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T12:34:00.888Z","repository_id":96461375,"created_at":"2025-08-24T12:34:00.888Z","updated_at":"2025-08-24T12:34:00.888Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28494275,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T02:39:23.645Z","status":"ssl_error","status_checked_at":"2026-01-17T02:34:19.649Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["golang","pprof"],"created_at":"2026-01-17T04:06:18.334Z","updated_at":"2026-01-17T04:06:18.398Z","avatar_url":"https://github.com/tommsawyer.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Collect\n[![Go Report Card](https://goreportcard.com/badge/github.com/tommsawyer/collect)](https://goreportcard.com/report/github.com/tommsawyer/collect)\n[![codecov](https://codecov.io/gh/tommsawyer/collect/branch/main/graph/badge.svg?token=63GFZ0O3OR)](https://codecov.io/gh/tommsawyer/collect)\n\nAllows you to collect all pprof profiles with one command.\n\n## Installation\nJust go-get it:\n```bash\n$ go get github.com/tommsawyer/collect/cmd/collect\n```\n\n## Motivation\n\nSometimes I need to quickly collect all pprof profiles for future optimization. It's very frustrating to do it with long curl commands like:\n```bash\n$ curl -sK -v http://localhost:8080/debug/pprof/heap \u003e heap.out \u0026\u0026 curl -sK -v http://localhost:8080/debug/pprof/allocs \u003e allocs.out \u0026\u0026 curl -sK -v http://localhost:8080/debug/pprof/goroutine \u003e goroutine.out \u0026\u0026 curl -sK -v http://localhost:8080/debug/pprof/profile \u003e profile.out \u0026\u0026 curl -o ./trace \"http://localhost:8080/debug/pprof/trace?debug=1\u0026seconds=20\"\n\n```\n\nAlso:\n- it doesn't run concurrently, resulting in slow execution\n- you have to manually move profiles to some directories if you want to store them for future comparison\n- you need to wait for the command to complete and run it again if you want to collect profiles several times\n\n## Usage\nProvide url from which profiles will be scraped:\n```bash\n$ collect -u=http://localhost:8080\n```\nThis will download allocs, heap, goroutine and cpu profiles and save them into a directory structure like this:\n\n```\n- localhost 8080\n  - YYYY MM DD\n    - HH MM SS\n      - allocs\n      - heap\n      - profile\n      - goroutine\n```\n\nYou can provide as many urls as you want:\n```bash\n$ collect -u=http://localhost:8080 -u=http://localhost:7070\n```\n\nYou can choose which profiles will be scraped:\n```bash\n$ collect -p=allocs -p=heap -u=http://localhost:8080\n```\n\nQuery parameters for profiles are also supported:\n```bash\n$ collect -p=trace\\?seconds\\=20 -u=http://localhost:8080\n```\n\nUse `-l` flag to collect profiles in an endless loop(until Ctrl-C). This will collect profiles every 60 seconds (you can redefine interval with `-i`).\n```bash\n$ collect -l -u=http://localhost:8080\n```\n\n## Command-Line flags\n| Flag        | Default                        | Usage                                      |\n| ----------- | -------------------------------| -------------------------------------------|\n| -u          |                                | url from which profiles will be collected. |\n| -p          | allocs,heap,goroutine,profile  | profiles to collect.                       |\n| -l          | false                          | collect profiles in endless loop           |\n| -i          | 60s                            | interval between collecting. use with -l   |\n| -d          | ./                             | directory to put the pprof files in.       |\n| -k          | false                          | keep going collect if some requests failed.|\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftommsawyer%2Fcollect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftommsawyer%2Fcollect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftommsawyer%2Fcollect/lists"}