Include benchmark extension
See original GitHub issueMy JUnit 5 demo contains a benchmark extension that very naively uses System.currentTimeMillis()
to report a test’s wall clock time. Use:
@Test
@Benchmark
void benchmarked() throws InterruptedException {
Thread.sleep(100);
assertTrue(true);
}
Output:
timestamp = 2018-07-28T09:53:39.128030, Benchmark = Test 'benchmarked()' took 101 ms.
timestamp = 2018-07-28T09:53:39.136931, Benchmark = Test container 'BenchmarkTest' took 152 ms
I think this is worthy for inclusion in JUnit Pioneer. Thoughts?
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (8 by maintainers)
Top Results From Across the Web
Benchmarking Extension - The Chromium Projects
The Chromium Benchmarking Extension is a quick-and-dirty way to test page load time performance within Chrome. Features. Can clear the cache between each...
Read more >Benchmark in EF Extensions (EFE)
Learn Benchmark using EntityFramework Extensions by documentation & example. ... Forget to JIT compile the library; Include method not related to the test ......
Read more >Benchmark Extension Activities Teaching Resources | TPT
Browse benchmark extension activities resources on Teachers Pay Teachers, ... Also included in: Benchmark Advance First Grade.
Read more >RockiRider/BenchIt: VSCode Extension for Micro-Benchmarking
BenchMe README for Visual Studio Code. A micro-benchmarking tool for developers with Live Programming aspects. Only supports JavaScript for now.
Read more >Benchmarks - Storage Performance Council
The SPC-1C/E benchmark extension for storage components creates the first industry-standard storage benchmark that includes measurement and reporting of energy ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Maybe you should use
java.time.Clock
and its subclasses (I also found one from junit5 :org.junit.platform.console.tasks.IncrementingClock
) or Guava’s Stopwatch and TickerTo not have this issue open forever, we decided to close it. If other performance-related extensions show up, we can always reopen it.