{"id":20474226,"url":"https://github.com/marschall/junit4-jfr","last_synced_at":"2025-09-09T16:46:12.491Z","repository":{"id":54831151,"uuid":"194523280","full_name":"marschall/junit4-jfr","owner":"marschall","description":"a JUnit 4 extension that generates JFR events","archived":false,"fork":false,"pushed_at":"2021-01-26T18:28:50.000Z","size":575,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-16T02:44:58.826Z","etag":null,"topics":["java-flight-recorder","junit","junit4"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marschall.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-30T14:09:04.000Z","updated_at":"2021-01-26T18:28:52.000Z","dependencies_parsed_at":"2022-08-14T04:10:32.067Z","dependency_job_id":null,"html_url":"https://github.com/marschall/junit4-jfr","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marschall%2Fjunit4-jfr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marschall%2Fjunit4-jfr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marschall%2Fjunit4-jfr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marschall%2Fjunit4-jfr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marschall","download_url":"https://codeload.github.com/marschall/junit4-jfr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242039718,"owners_count":20061928,"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":["java-flight-recorder","junit","junit4"],"created_at":"2024-11-15T14:28:41.208Z","updated_at":"2025-03-05T14:16:54.562Z","avatar_url":"https://github.com/marschall.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"JUnit 4 JFR [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.marschall/junit4-jfr/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.marschall/junit4-jfr) [![Javadocs](https://www.javadoc.io/badge/com.github.marschall/junit4-jfr.svg)](https://www.javadoc.io/doc/com.github.marschall/junit4-jfr)\n===========\n\nA JUnit extension that generates JFR events.\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.marschall\u003c/groupId\u003e\n  \u003cartifactId\u003ejunit4-jfr\u003c/artifactId\u003e\n  \u003cversion\u003e0.1.0\u003c/version\u003e\n  \u003cscope\u003etest\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\nRequires Java 11 based on OpenJDK.\n\n![Flight Recording of a JUnit Test](https://raw.githubusercontent.com/marschall/junit4-jfr/master/src/main/javadoc/screenshot.png)\n\nIf you can migrate to JUnit 5 and [marschall/junit-jfr](https://github.com/marschall/junit-jfr) as it offers much higher fidelity.\n\n\nUsage\n-----\n\n* Add a `JfrMethodRule` to your unit test class, see [JfrMethodRuleTest](https://github.com/marschall/junit4-jfr/blob/master/src/test/java/com/github/marschall/junit4/jfr/JfrMethodRuleTest.java) for and example.\n* Generate a flight recording from your unit tests, eg using\n```\n-XX:StartFlightRecording:filename=recording.jfr\n-XX:FlightRecorderOptions:stackdepth=128\n```\n\n```java\npublic class ProfiledTest {\n\n  @Rule\n  public JfrMethodRule jfr = new JfrMethodRule();\n\n  @Test\n  public void testMethod() {\n    // implementation\n  }\n\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarschall%2Fjunit4-jfr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarschall%2Fjunit4-jfr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarschall%2Fjunit4-jfr/lists"}