{"id":36419370,"url":"https://github.com/criterion-rs/criterion-perf-events","last_synced_at":"2026-03-15T22:14:52.029Z","repository":{"id":43323637,"uuid":"260688577","full_name":"criterion-rs/criterion-perf-events","owner":"criterion-rs","description":"A plugin for Criterion.rs to measure Linux perf events.","archived":false,"fork":false,"pushed_at":"2025-12-02T13:06:45.000Z","size":20,"stargazers_count":45,"open_issues_count":7,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-02T10:54:02.550Z","etag":null,"topics":["benchmarking","performance-analysis","performance-testing","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/criterion-rs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-05-02T13:05:03.000Z","updated_at":"2025-12-02T13:06:04.000Z","dependencies_parsed_at":"2024-01-07T06:16:40.690Z","dependency_job_id":"d70bf656-8497-4e10-a3d0-240a05350fbc","html_url":"https://github.com/criterion-rs/criterion-perf-events","commit_stats":{"total_commits":26,"total_committers":7,"mean_commits":"3.7142857142857144","dds":0.5769230769230769,"last_synced_commit":"dc41c6c5ff52b83d9ab08805e892741e8960d812"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/criterion-rs/criterion-perf-events","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/criterion-rs%2Fcriterion-perf-events","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/criterion-rs%2Fcriterion-perf-events/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/criterion-rs%2Fcriterion-perf-events/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/criterion-rs%2Fcriterion-perf-events/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/criterion-rs","download_url":"https://codeload.github.com/criterion-rs/criterion-perf-events/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/criterion-rs%2Fcriterion-perf-events/sbom","scorecard":{"id":510647,"data":{"date":"2025-08-11","repo":{"name":"github.com/jbreitbart/criterion-perf-events","commit":"dc41c6c5ff52b83d9ab08805e892741e8960d812"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Code-Review","score":2,"reason":"Found 3/15 approved changesets -- score normalized to 2","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":"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":"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":"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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/rust.yml:1","Warn: no topLevel permission defined: .github/workflows/security_audit.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":"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/rust.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/jbreitbart/criterion-perf-events/rust.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rust.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/jbreitbart/criterion-perf-events/rust.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rust.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/jbreitbart/criterion-perf-events/rust.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rust.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/jbreitbart/criterion-perf-events/rust.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rust.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/jbreitbart/criterion-perf-events/rust.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rust.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/jbreitbart/criterion-perf-events/rust.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/security_audit.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/jbreitbart/criterion-perf-events/security_audit.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/security_audit.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/jbreitbart/criterion-perf-events/security_audit.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   6 third-party GitHubAction 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":"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":"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"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE-APACHE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE-APACHE: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 'master'"],"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 16 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"}}]},"last_synced_at":"2025-08-20T00:27:26.385Z","repository_id":43323637,"created_at":"2025-08-20T00:27:26.385Z","updated_at":"2025-08-20T00:27:26.385Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28314262,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"last_error":"SSL_read: 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":["benchmarking","performance-analysis","performance-testing","rust"],"created_at":"2026-01-11T17:03:34.191Z","updated_at":"2026-01-11T17:03:34.785Z","avatar_url":"https://github.com/criterion-rs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Criterion-perf-events\n\nThis is a measurement plugin for [Criterion.rs](https://github.com/bheisler/criterion.rs) to measure events of the Linux perf interface.\n\n## Supported Events\n\nCriterion-perf-events uses the [`perfcnt`](https://gz.github.io/rust-perfcnt/perfcnt/index.html) crate and supports events provided by this crate. If you are interested in more details, please take a look at the events listed here:\n\n* [Hardware events](https://gz.github.io/rust-perfcnt/perfcnt/linux/enum.HardwareEventType.html)\n* [Software events](https://gz.github.io/rust-perfcnt/perfcnt/linux/enum.SoftwareEventType.html)\n* [Perf events](https://gz.github.io/rust-perfcnt/perfcnt/linux/enum.Event.html)\n* [Raw Intel events](https://gz.github.io/rust-perfcnt/x86/perfcnt/intel/description/struct.IntelPerformanceCounterDescription.html)\n\n## Troubleshooting\n\nIf you get a \"Permission denied\" error, update `perf_event_paranoid`:\n```\nsudo sh -c 'echo 1 \u003e/proc/sys/kernel/perf_event_paranoid'\n```\nFor further details please take a look at the following [link](https://superuser.com/questions/980632/run-perf-without-root-rights).\n\n## Example\n\nThe following code shows how to count retired instructions.\n\n```rust\nuse criterion::{criterion_group, criterion_main, BenchmarkId, black_box, Criterion};\nuse criterion_perf_events::Perf;\nuse perfcnt::linux::HardwareEventType as Hardware;\nuse perfcnt::linux::PerfCounterBuilderLinux as Builder;\n\nfn fibonacci_slow(n: usize) -\u003e usize {\n    match n {\n        0 =\u003e 1,\n        1 =\u003e 1,\n        n =\u003e fibonacci_slow(n - 1) + fibonacci_slow(n - 2),\n    }\n}\n\nfn bench(c: \u0026mut Criterion\u003cPerf\u003e) {\n    let mut group = c.benchmark_group(\"fibonacci\");\n\n    let fibo_arg = 30;\n    group.bench_function(BenchmarkId::new(\"slow\", fibo_arg), |b| {\n        b.iter(|| fibonacci_slow(black_box(fibo_arg)))\n    });\n\n    group.finish()\n}\n\ncriterion_group!(\n    name = instructions_bench;\n    config = Criterion::default().with_measurement(Perf::new(Builder::from_hardware_event(Hardware::Instructions)));\n    targets = bench\n);\ncriterion_main!(instructions_bench);\n```\n\nrun with:\n```\ncargo criterion\n```\nOpen `target/criterion/reports/index.html` to view detailed results with plots.\nFor all event types (`Hardware::Instructions`, `Hardware::CacheMisses`...) criterion will always report cycles as the unit.\nNote that your event type is what is being shown, not CPU cycles.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcriterion-rs%2Fcriterion-perf-events","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcriterion-rs%2Fcriterion-perf-events","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcriterion-rs%2Fcriterion-perf-events/lists"}