{"id":33178955,"url":"https://github.com/perfmark/perfmark","last_synced_at":"2026-01-11T16:59:37.256Z","repository":{"id":35175041,"uuid":"185576294","full_name":"perfmark/perfmark","owner":"perfmark","description":"PerfMark is a High Performance Tracing Library.","archived":false,"fork":false,"pushed_at":"2025-11-08T17:33:15.000Z","size":2348,"stargazers_count":210,"open_issues_count":11,"forks_count":26,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-11-08T19:17:06.379Z","etag":null,"topics":["grpc","grpc-java","java","profiling","tracing"],"latest_commit_sha":null,"homepage":"https://www.perfmark.io","language":"Java","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/perfmark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-05-08T09:37:13.000Z","updated_at":"2025-11-08T17:33:12.000Z","dependencies_parsed_at":"2024-03-26T10:34:14.944Z","dependency_job_id":"d9936e22-7bf0-4230-9cb9-bdfded5cba17","html_url":"https://github.com/perfmark/perfmark","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/perfmark/perfmark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perfmark%2Fperfmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perfmark%2Fperfmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perfmark%2Fperfmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perfmark%2Fperfmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perfmark","download_url":"https://codeload.github.com/perfmark/perfmark/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perfmark%2Fperfmark/sbom","scorecard":{"id":727842,"data":{"date":"2025-08-11","repo":{"name":"github.com/perfmark/perfmark","commit":"f84ed5c31b94264b1f3328efc69ae439a6eba241"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/1 approved changesets -- score normalized to 0","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":1,"reason":"2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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/gradle-wrapper-validation.yml:1","Warn: no topLevel permission defined: .github/workflows/gradle.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":"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/gradle-wrapper-validation.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/perfmark/perfmark/gradle-wrapper-validation.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/gradle-wrapper-validation.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/perfmark/perfmark/gradle-wrapper-validation.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/gradle.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/perfmark/perfmark/gradle.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/gradle.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/perfmark/perfmark/gradle.yml/master?enable=pin","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 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":"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: Apache License 2.0: 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":"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'","Warn: branch protection not enabled for branch 'v0.23.x'"],"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 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-22T13:24:39.823Z","repository_id":35175041,"created_at":"2025-08-22T13:24:39.823Z","updated_at":"2025-08-22T13:24:39.823Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285511775,"owners_count":27184237,"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-11-20T02:00:05.334Z","response_time":54,"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":["grpc","grpc-java","java","profiling","tracing"],"created_at":"2025-11-16T03:00:36.816Z","updated_at":"2025-11-20T21:03:03.003Z","avatar_url":"https://github.com/perfmark.png","language":"Java","readme":"# PerfMark\n\n![PerfMark Hummingbird](doc/perfmark.png \"PerfMark\")\n\nPerfMark is a low-overhead, manually-instrumented, tracing library for Java.  Users can add the\ntracing function calls to their code to see how long each part takes.\n\n## Features\n\n*   **Very Low Overhead**:  When enabled, tracing a function call adds about **70ns**.   Tracing is\n    done in a lock-free, wait-free, thread local buffer, which avoids interfering with your \n    latency-sensitive code.\n    \n*   **Dynamically Enabled**: PerfMark can be enabled or disabled at runtime.  When disabled, \n    PerfMark has *zero overhead*, taking advantage of the JIT compiler to remove the tracing.\n    \n*   **Inter-thread Communication**: Existing profilers have difficulty expressing which thread \n    wakes up and executes work on another thread.  PerfMark allows users to express this \n    relationship explicitly, making for a clear picture of how code flows.\n\n*   **Small Library Size**: The PerfMark tracing API is only *7 KB* in size, and has minimal \n    dependencies making it easy to include in other projects.  If no backend for recording the trace\n    is present, the library safely disables itself.\n\n*   **Chrome Trace Viewer Integration**: PerfMark can export to the Chrome Trace Event Format, \n    making it easy to view in your Web Browser.\n    \n## Usage\n\nTo use PerfMark, add the following dependencies to your `build.gradle`:\n```\ndependencies {\n    implementation 'io.perfmark:perfmark-api:0.27.0'\n    // Only needed for applications, not libraries.\n    implementation 'io.perfmark:perfmark-traceviewer:0.27.0'\n}\n```\n\nOr in your `pom.xml`:\n\n```\n    \u003cdependency\u003e\n      \u003cgroupId\u003eio.perfmark\u003c/groupId\u003e\n      \u003cartifactId\u003eperfmark-api\u003c/artifactId\u003e\n      \u003cversion\u003e0.27.0\u003c/version\u003e\n    \u003c/dependency\u003e\n```\n\nIn your code, add the PerfMark tracing calls like so:\n\n```java\nMap\u003cString, Header\u003e parseHeaders(List\u003cString\u003e rawHeaders) {\n  try (TaskCloseable task = PerfMark.traceTask(\"Parse HTTP headers\")) {\n    Map\u003cString, String\u003e headers = new HashMap\u003c\u003e();\n    for (String rawHeader : rawHeaders) {\n      Header header = parseHeader(rawHeader);\n      headers.put(header.name(), header);\n    }\n    return headers;\n  }\n}\n\n```\n\nPerfMark can also be used to record asynchronous work:\n\n```java\nFuture\u003cResponse\u003e buildResponse() {\n  try (TaskCloseable task = PerfMark.traceTask(\"Build Response\")) {\n    Link link = PerfMark.linkOut();\n    return executor.submit(() -\u003e {\n      try (TaskCloseable task2 = PerfMark.traceTask(\"Async Response\")) {\n        PerfMark.linkIn(link);\n        return new Response(/* ... */);\n      }\n    });\n  }\n}\n```\n\nTo view the traces in your browser, generate the HTML:\n\n```java\n  PerfMark.setEnabled(true);\n  PerfMark.event(\"My Task\");\n  TraceEventViewer.writeTraceHtml();\n```\n\nThe output looks like:\n\n![PerfMark Trace View](doc/screenshot.png \"PerfMark\")\n\n## Configuration \nPerfMark provides some System Properties that allow controlling how it initializes.  These can be set\nby providing them as JVM arguments.  (e.g. `-Dio.perfmark.PerfMark.startEnabled=true`)\n\n* `io.perfmark.PerfMark.startEnabled` controls if PerfMark starts enabled.  This boolean property\n    makes it possible to start tracing calls immediately.  This is helpful when it's difficult\n    to invoke `setEnabled()` on PerfMark before task tracing calls have started.\n\n* `io.perfmark.PerfMark.debug` controls if PerfMark can log initializing steps.  This property \n    exists to disable class loading of the logger package (currently `java.util.logging`).  If\n    the debug property is set, the logger settings still need to be configured to report the logs.\n    By default, all PerfMark logs use level `FINE` (SLF4J `DEBUG`) or lower, which means that they\n    usually need additional setup to print.\n  \n    In addition to initialization, the debug property controls if other tracing failures can be \n    logged. When calls involving deferred execution are used (e.g. \n    `startTask(T, StringFunction\u003cT\u003e)`), the String function provided may throw an exception.  In\n    these cases, the exception is silently ignored.  This makes it easy to ensure the start/stop\n    call parity is maintained.  To view these failures, the debug property can be set to log such\n    problems.  As above, the PerfMark logger should be configured as well to report these.\n\n## Versioning and API Stability\n\nPerfMark uses Semantic Versioning, and thus will not break existing APIs within a minor version \nupdate.  PerfMark may need to disable some functionality, and thus may need to make some tracing \ncalls become No-ops.  In such cases, it will remain safe to call these functions being recorded.\n\n## Users\n\nPerfMark was designed originally for [gRPC](https://github.com/grpc/grpc-java). It is also used\nby [Zuul](https://github.com/Netflix/zuul).\n","funding_links":[],"categories":["分布式跟踪"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperfmark%2Fperfmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperfmark%2Fperfmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperfmark%2Fperfmark/lists"}