{"id":18009305,"url":"https://github.com/mhallin/signpost-rs","last_synced_at":"2025-05-07T21:22:17.633Z","repository":{"id":70901285,"uuid":"458597149","full_name":"mhallin/signpost-rs","owner":"mhallin","description":"Rust signpost library for macOS/iOS","archived":false,"fork":false,"pushed_at":"2022-02-12T19:05:27.000Z","size":8,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-31T14:11:23.499Z","etag":null,"topics":["macos","performance","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/mhallin.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-02-12T17:50:38.000Z","updated_at":"2025-03-03T00:28:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"ec36ea81-fe99-4f76-bc27-b05d467dd726","html_url":"https://github.com/mhallin/signpost-rs","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/mhallin%2Fsignpost-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhallin%2Fsignpost-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhallin%2Fsignpost-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhallin%2Fsignpost-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mhallin","download_url":"https://codeload.github.com/mhallin/signpost-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252955167,"owners_count":21831063,"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":["macos","performance","rust"],"created_at":"2024-10-30T02:09:03.512Z","updated_at":"2025-05-07T21:22:17.613Z","avatar_url":"https://github.com/mhallin.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Signpost library for macOS\n\n[Signposts](https://developer.apple.com/documentation/os/logging/recording_performance_data)\nare a low-overhead way of measuring performance of tasks and algorithms on macOS\nand iOS.\n\nThis library exposes a Rust interface to the Signposts API which automatically\nturns itself off on unsupported platforms.\n\n## Usage\n\nUse a combination of events and intervals to measure times of algorithms and\ntasks in your application when running under Instruments. The use of macros\nallow construction of null-terminated C strings at compile time rather than at\nruntime.\n\n```rust\nuse signpost::{OsLog, const_poi_logger};\n\nstatic LOGGER: OsLog = const_poi_logger!(\"com.yourcompany.project\");\n\nfn myalgorithm() {\n    // Create a signpost interval for your function. The interval ends\n    // when the variable goes out of scope.\n    let _interval = signpost::begin_interval!(\n        LOGGER,\n        /* Interval ID */ 1,\n        /* Interval name */ \"My Algorithm\"\n    );\n\n    if condition {\n        // Emit a single event\n        signpost::emit_event!(\n            LOGGER,\n            /* Event ID */ 2,\n            /* Event name */ \"Condition happened\"\n        );\n    }\n}\n```\n\n## Disabling the signposts\n\nEnable the `disable-signposts` feature to make the logging function no-ops even\non macOS/iOS.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhallin%2Fsignpost-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmhallin%2Fsignpost-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhallin%2Fsignpost-rs/lists"}