{"repo":"apple/swift-system-metrics","free":true,"listed":false,"github":"https://github.com/apple/swift-system-metrics","clone":"git clone https://github.com/apple/swift-system-metrics.git","description":"Report process-level system metrics (memory, CPU, file descriptors) to Swift Metrics","language":"Swift","stars":181,"topics":["metrics","process","server","swift","swift-server","system"],"license":"Apache-2.0","category":"analytics","readme_excerpt":"Swift System Metrics A Swift library for reporting process-level system metrics (memory, CPU, file descriptors) to Swift Metrics. - 📚 Documentation is available on the Swift Package Index. - 💻 Examples are available in the Examples directory. - 🚀 Contributions are welcome, please see CONTRIBUTING.md. - 🪪 License is Apache 2.0, repeated in LICENSE. - 🔒 Security issues should be reported via the security process. Overview Swift System Metrics provides a type that periodically collects process-level system metrics and reports them to the Swift Metrics factory. This package is designed to be run in tools and applications directly and is not expected to be used from libraries. If you'd like to report additional metrics from your library, use Swift Metrics directly. Quick start Add the dependency to your Package.swift : Add the library dependency to your target: Import and use in your code: Collected metrics The monitor collects and reports the following metrics as gauges: - Virtual Memory : Total virtual memory, in bytes, that the process allocates. - Metric name: process virtual memory bytes - Resident Memory : Physical memory, in bytes, that the process currently uses. - Metric name: process resident memory bytes - Start Time : Process start time, in seconds, since UNIX epoch. - Metric name: process start time seconds - CPU Time : Cumulative CPU time the process consumes, in seconds. - Metric name: process cpu seconds total - Max File Descriptors : The maximum number of fil","default_branch":null,"files":null,"tree":[],"storefront":"/r/apple","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/apple/swift-system-metrics/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}