{"id":32501312,"url":"https://github.com/arl/runtimefs","last_synced_at":"2025-10-27T16:48:53.486Z","repository":{"id":319993727,"uuid":"1079817345","full_name":"arl/runtimefs","owner":"arl","description":"Expose your Go application runtime metrics as a filesystem","archived":false,"fork":false,"pushed_at":"2025-10-21T10:06:45.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-21T11:34:34.492Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/arl.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-20T12:38:49.000Z","updated_at":"2025-10-21T10:12:09.000Z","dependencies_parsed_at":"2025-10-21T11:34:39.519Z","dependency_job_id":"fbd1f6c8-1bc6-4c0a-955e-f4c487c34e3c","html_url":"https://github.com/arl/runtimefs","commit_stats":null,"previous_names":["arl/runtimefs"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/arl/runtimefs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arl%2Fruntimefs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arl%2Fruntimefs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arl%2Fruntimefs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arl%2Fruntimefs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arl","download_url":"https://codeload.github.com/arl/runtimefs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arl%2Fruntimefs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281305246,"owners_count":26478374,"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","status":"online","status_checked_at":"2025-10-27T02:00:05.855Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-10-27T16:48:51.737Z","updated_at":"2025-10-27T16:48:53.480Z","avatar_url":"https://github.com/arl.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# runtimefs\n\nPackage runtimefs provides a FUSE filesystem that exposes runtime/metrics data as files and directories.\n\nMetrics are organized in a directory hierarchy that mirrors their names.\n\n\n- [runtimefs](#runtimefs)\n  - [Quick start](#quick-start)\n  - [Metric representation](#metric-representation)\n    - [Single value metrics (`KindFloat64`, `KindUint64`)](#single-value-metrics-kindfloat64-kinduint64)\n    - [Histogram metrics (kind `KindFloat64Histogram`)](#histogram-metrics-kind-kindfloat64histogram)\n  - [Example usages](#example-usages)\n  - [License](#license)\n\n\n## Quick start\n\nInstall the library:\n\n```\ngo get github.com/arl/runtimefs@latest\n```\n\nTo quickly try it out and explore the created filesystem, just run:\n\n```\ncd /tmp\nmkdir metrics\ngo run github.com/arl/runtimefs/cmd/example@latest metrics\n```\n\n**API**:\n\n```go\n// Mount mounts the runtime metrics filesystem at the given directory path. It\n// returns a function to unmount the filesystem, or an error if the mount\n// operation failed.\nfunc Mount(dirpath string) (UnmountFunc, error)\n\n// UnmountFunc is the type of the function to unmount the filesystem.\ntype UnmountFunc func() error\n```\n\nExample usage:\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\t\"os/signal\"\n\n\t\"github.com/arl/runtimefs\"\n)\n\nconst mountDir = \"./mnt\"\n\nfunc main() {\n\tunmount, _ := runtimefs.Mount(mountDir)\n\n\tctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt)\n\tdefer cancel()\n\t\u003c-ctx.Done()\n\n\terr := unmount(); err != nil { /* handle error */ }\n}\n```\n\n## Metric representation\n\n\n### Single value metrics (`KindFloat64`, `KindUint64`)\n\nSingle value metrics are represented as a directory containing:\n - a file named after the unit (e.g. `bytes`, `seconds`) that contains the current value\n - a file named `description` that contains the metric description\n - a file named `cumulative` (1 or 0) that indicates whether the metric is cumulative or not\n\nFor example, `/memory/classes/heap/objects` is shown as:\n\n    \u003cmount_dir\u003e/memory/classes/heap/objects/\n    ├── bytes\n    ├── cumulative\n    └── description\n\n\n### Histogram metrics (kind `KindFloat64Histogram`)\n\nHistogram metrics are represented as a directory containing:\n - a file named after the unit (e.g. `bytes`, `seconds`) that contains the current value (one line per bucket)\n - a file named `buckets` that contains the bucket boundaries (one line per boundary)\n - a file named `description` that contains the metric description\n - a file named `cumulative` (1 or 0) that indicates whether the metric is cumulative or not\n\nFor example, `/sched/pauses/total/gc` is shown as:\n\n    \u003cmount_dir\u003e/sched/pauses/total/gc/\n    ├── buckets\n    ├── bytes\n    ├── cumulative\n    └── description\n\n\n\n## Example usages\n\n\nPrint bytes on the heap:\n```\ncat \u003cmount_dir\u003e/gc/heap/live/bytes\n```\n\nMonitor objects on the heap:\n```\nwatch -n1 'expr $(cat \u003cmount_dir\u003e/gc/heap/allocs/objects) - $(cat \u003cmount_dir\u003e/gc/heap/frees/objects)'\n```\n\nExplore metrics:\n```\ntree \u003cmount_dir\u003e\n```\nor \n```\nls -R \u003cmount_dir\u003e\n``` \n\nCurrent distribution of GC pause durations:\n```\npaste \u003cmount_dir\u003e/sched/pauses/total/gc/buckets \u003cmount_dir\u003e/sched/pauses/total/gc/seconds\n```\n\nFind all histogram metrics:\n```\nfind \u003cmount_dir\u003e -name buckets\n```\n\n## License\n\nMIT, see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farl%2Fruntimefs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farl%2Fruntimefs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farl%2Fruntimefs/lists"}