JPDH

Windows Performance Data Helper for Java

Лицензия

Лицензия

Группа

Группа

com.arkanosis
Идентификатор

Идентификатор

jpdh
Последняя версия

Последняя версия

1.1.4
Дата

Дата

Тип

Тип

jar
Описание

Описание

JPDH
Windows Performance Data Helper for Java
Ссылка на сайт

Ссылка на сайт

https://jpdh.arkanosis.com/
Система контроля версий

Система контроля версий

https://github.com/Arkanosis/JPDH/

Скачать jpdh

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.arkanosis/jpdh/ -->
<dependency>
    <groupId>com.arkanosis</groupId>
    <artifactId>jpdh</artifactId>
    <version>1.1.4</version>
</dependency>
// https://jarcasting.com/artifacts/com.arkanosis/jpdh/
implementation 'com.arkanosis:jpdh:1.1.4'
// https://jarcasting.com/artifacts/com.arkanosis/jpdh/
implementation ("com.arkanosis:jpdh:1.1.4")
'com.arkanosis:jpdh:jar:1.1.4'
<dependency org="com.arkanosis" name="jpdh" rev="1.1.4">
  <artifact name="jpdh" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.arkanosis', module='jpdh', version='1.1.4')
)
libraryDependencies += "com.arkanosis" % "jpdh" % "1.1.4"
[com.arkanosis/jpdh "1.1.4"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

JPDH — Windows Performance Data Helper for Java Maven Central License

JPDH is a Java library to retrieve performance counter values on Microsoft Windows using the PDH (Performance Data Helper) API and some additional features built on top of it.

Installation

Manually

Add jpdh.jar to your CLASSPATH.

With Maven

<dependency>
  <groupId>com.arkanosis</groupId>
  <artifactId>jpdh</artifactId>
  <version>1.1.4</version>
</dependency>

With Gradle

compile("com.arkanosis:jpdh:1.1.4")

Usage

import com.arkanosis.jpdh.Counter;
import com.arkanosis.jpdh.JPDH;
import com.arkanosis.jpdh.Query;

try (Query query = JPDH.openQuery()) {
	Counter diskCounter = query.addCounter("\\PhysicalDisk(_Total)\\Disk Read Bytes/sec");
	Counter cpuCounter = query.addCounter("\\PID(8584)\\% User Time");
	query.collectData();
	System.out.println(diskCounter.getDoubleValue());
	System.out.println(cpuCounter.getIntegerValue());
	query.removeCounter(diskCounter);
}

Any valid PDH counter path can be used, and additional counter path using the non-PDH “PID” object can be used as well:

\\computer\Process(parent/instance#index)\counter
\\computer\PID(pid)\counter

Build

Run make.

If you don't have a POSIX environment under Windows, you might want to have a look at MSYS2.

Additionally, you may run the test suite using make runtest.

History

  • 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.
  • 2017-09-14: version 1.1.3 — Bugfix release. The virtual “PID” object didn't work on localized (eg. German) versions of Windows.
  • 2016-06-08: version 1.1.2 — Bugfix release. Calling Query.removeCounter(counter) on counters associated with dead processes was throwing an exception.
  • 2016-06-01: version 1.1.1 — Bugfix release. Calling Query.removeCounter(counter) on counters associated with dead processes was throwing an exception.
  • 2016-04-19: version 1.1 — Additional “PID” object which maps to the “Process” object for the right process instance and index
  • 2016-04-01: version 1.0 — Initial version exposing PDH features in Java

Contact

Send an email to Jérémie Roquet jroquet@arkanosis.net.

License

JPDH is distributed under the BSD license, see the LICENSE file.

Версии библиотеки

Версия
1.1.4
1.1.3