Benchmarking done easy in Java


/ Published in: Java
Save to your folder(s)



Copy this code and paste it in your HTML
  1. public class GaussianBenchmark {
  2. private ByteImage img;
  3.  
  4. @BeforeClass
  5. public void setUp(){
  6. img = new ByteImage("test-images/huge.jpg");
  7. }
  8.  
  9. @Benchmark(times = 30)
  10. public void ImageOperationsGaussian(){
  11. ImageOperations.gaussian(img);
  12. }
  13.  
  14. @AfterClass
  15. public void tearDown(){
  16. img = null;
  17. }
  18. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.