JUnit JFR

A JUnit extension that generates JFR events.

Лицензия

Лицензия

MIT
Категории

Категории

JUnit Тестирование компонентов
Группа

Группа

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

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

junit4-jfr
Последняя версия

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

0.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

JUnit JFR
A JUnit extension that generates JFR events.
Ссылка на сайт

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

https://github.com/marschall/junit4-jfr
Система контроля версий

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

https://github.com/marschall/junit4-jfr

Скачать junit4-jfr

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

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

Зависимости

provided (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12

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

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

JUnit 4 JFR Maven Central Javadocs

A JUnit extension that generates JFR events.

<dependency>
  <groupId>com.github.marschall</groupId>
  <artifactId>junit4-jfr</artifactId>
  <version>0.1.0</version>
  <scope>test</scope>
</dependency>

Requires Java 11 based on OpenJDK.

Flight Recording of a JUnit Test

If you can migrate to JUnit 5 and marschall/junit-jfr as it offers much higher fidelity.

Usage

  • Add a JfrMethodRule to your unit test class, see JfrMethodRuleTest for and example.
  • Generate a flight recording from your unit tests, eg using
-XX:StartFlightRecording:filename=recording.jfr
-XX:FlightRecorderOptions:stackdepth=128
public class ProfiledTest {

  @Rule
  public JfrMethodRule jfr = new JfrMethodRule();

  @Test
  public void testMethod() {
    // implementation
  }

}

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

Версия
0.1.0