{"id":15922182,"url":"https://github.com/arkanosis/jpdh","last_synced_at":"2026-05-05T23:32:50.164Z","repository":{"id":57717455,"uuid":"56075813","full_name":"Arkanosis/JPDH","owner":"Arkanosis","description":"Windows Performance Data Helper for Java","archived":false,"fork":false,"pushed_at":"2019-09-23T17:08:41.000Z","size":65,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T01:44:00.046Z","etag":null,"topics":["counter","java","pdh","performance","windows"],"latest_commit_sha":null,"homepage":"https://jpdh.arkanosis.com","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Arkanosis.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}},"created_at":"2016-04-12T15:35:18.000Z","updated_at":"2019-09-23T17:08:43.000Z","dependencies_parsed_at":"2022-09-05T20:20:37.651Z","dependency_job_id":null,"html_url":"https://github.com/Arkanosis/JPDH","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arkanosis%2FJPDH","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arkanosis%2FJPDH/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arkanosis%2FJPDH/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arkanosis%2FJPDH/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Arkanosis","download_url":"https://codeload.github.com/Arkanosis/JPDH/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246999014,"owners_count":20866853,"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":["counter","java","pdh","performance","windows"],"created_at":"2024-10-06T20:20:27.640Z","updated_at":"2026-05-05T23:32:50.117Z","avatar_url":"https://github.com/Arkanosis.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JPDH — Windows Performance Data Helper for Java [![Maven Central](https://img.shields.io/maven-central/v/com.arkanosis/jpdh.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.arkanosis%22%20AND%20a:%22jpdh%22) [![License](https://img.shields.io/badge/license-BSD-blue.svg)](/LICENSE)\n\nJPDH is a Java library to retrieve performance counter values on Microsoft\nWindows using the PDH (Performance Data Helper) API and some additional features built on top of it.\n\n## Installation\n\n### Manually\n\nAdd jpdh.jar to your CLASSPATH.\n\n### With Maven\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.arkanosis\u003c/groupId\u003e\n  \u003cartifactId\u003ejpdh\u003c/artifactId\u003e\n  \u003cversion\u003e1.1.4\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### With Gradle\n\n```kotlin\ncompile(\"com.arkanosis:jpdh:1.1.4\")\n```\n\n## Usage\n\n```java\nimport com.arkanosis.jpdh.Counter;\nimport com.arkanosis.jpdh.JPDH;\nimport com.arkanosis.jpdh.Query;\n\ntry (Query query = JPDH.openQuery()) {\n\tCounter diskCounter = query.addCounter(\"\\\\PhysicalDisk(_Total)\\\\Disk Read Bytes/sec\");\n\tCounter cpuCounter = query.addCounter(\"\\\\PID(8584)\\\\% User Time\");\n\tquery.collectData();\n\tSystem.out.println(diskCounter.getDoubleValue());\n\tSystem.out.println(cpuCounter.getIntegerValue());\n\tquery.removeCounter(diskCounter);\n}\n```\n\nAny valid PDH counter path can be used, and additional counter path using the non-PDH “PID” object can be used as well:\n\n```\n\\\\computer\\Process(parent/instance#index)\\counter\n\\\\computer\\PID(pid)\\counter\n```\n\n## Build\n\nRun `make`.\n\nIf you don't have a POSIX environment under Windows, you might want to have\na look at [MSYS2](https://msys2.github.io/).\n\nAdditionally, you may run the test suite using `make runtest`.\n\n## History\n\n* 2019-09-20: version 1.1.4 — Bugfix release. Counters based on the virtual “PID” object sometimes couldn't be initialized while lots of processes were started of stopped.\n* 2017-09-14: version 1.1.3 — Bugfix release. The virtual “PID” object didn't work on localized (eg. German) versions of Windows.\n* 2016-06-08: version 1.1.2 — Bugfix release. Calling Query.removeCounter(counter) on counters associated with dead processes was throwing an exception.\n* 2016-06-01: version 1.1.1 — Bugfix release. Calling Query.removeCounter(counter) on counters associated with dead processes was throwing an exception.\n* 2016-04-19: version 1.1 — Additional “PID” object which maps to the “Process” object for the right process instance and index\n* 2016-04-01: version 1.0 — Initial version exposing PDH features in Java\n\n## Contact\n\nSend an email to Jérémie Roquet \u003cjroquet@arkanosis.net\u003e.\n\n## License\n\nJPDH is distributed under the BSD license, see the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farkanosis%2Fjpdh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farkanosis%2Fjpdh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farkanosis%2Fjpdh/lists"}