Created
November 21, 2024 23:18
-
-
Save vladdedita/92b6bc6dc70f27238123d86deb96c955 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ManuallyTimingTest { | |
private long startTime; | |
@BeforeEach | |
void startTimer() { | |
startTime = System.currentTimeMillis(); | |
} | |
@AfterEach | |
void logDuration(TestInfo testInfo) { | |
long duration = System.currentTimeMillis() - startTime; | |
System.out.println(testInfo.getDisplayName() + " took " + duration + " ms"); | |
} | |
@Test | |
void test() { | |
// Test logic | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment