Guest User

Untitled

a guest
Mar 19th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1. public class MyBenchmark {
  2. @Benchmark
  3. @BenchmarkMode(Mode.SingleShotTime)
  4. @OutputTimeUnit(TimeUnit.MILLISECONDS)
  5. @Warmup(iterations = 10, time = 1, timeUnit = TimeUnit.MILLISECONDS)
  6. @Measurement(iterations = 100, time = 200, timeUnit = TimeUnit.MILLISECONDS)
  7. public void dom(String file_name) {
  8. try {
  9. File fXmlFile = new File(file_name);
  10. DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
  11. DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
  12. Document doc = dBuilder.parse(fXmlFile);
  13. } catch (Exception e) {
  14. e.printStackTrace();
  15. }
  16. }
  17.  
  18. for (int i=1; i<= 25; i++){
  19. String file_name = Integer.toString(i) + ".xml";
  20. dom(file_name);
  21. }
  22. }
  23.  
  24. first-benchmark: Compilation failure: Compilation failure:
  25. [ERROR] /D:/Testing/first-benchmark/src/main/java/com/tri/MyBenchmark.java:[71,9] illegal start of type
  26. [ERROR] /D:/Testing/first-benchmark/src/main/java/com/tri/MyBenchmark.java:[71,19] ')' expected
  27. [ERROR] /D:/Testing/first-benchmark/src/main/java/com/tri/MyBenchmark.java:[71,20] illegal start of type
  28. [ERROR] /D:/Testing/first-benchmark/src/main/java/com/tri/MyBenchmark.java:[71,21] <identifier> expected
  29. [ERROR] /D:/Testing/first-benchmark/src/main/java/com/tri/MyBenchmark.java:[71,22] ';' expected
  30. [ERROR] /D:/Testing/first-benchmark/src/main/java/com/tri/MyBenchmark.java:[71,24] illegal start of type
  31. [ERROR] /D:/Testing/first-benchmark/src/main/java/com/tri/MyBenchmark.java:[71,26] <identifier> expected
  32. [ERROR] /D:/Testing/first-benchmark/src/main/java/com/tri/MyBenchmark.java:[71,32] <identifier> expected
  33. [ERROR] /D:/Testing/first-benchmark/src/main/java/com/tri/MyBenchmark.java:[71,34] illegal start of type
  34. [ERROR] /D:/Testing/first-benchmark/src/main/java/com/tri/MyBenchmark.java:[71,35] <identifier> expected
  35. [ERROR] /D:/Testing/first-benchmark/src/main/java/com/tri/MyBenchmark.java:[71,36] ';' expected
  36. [ERROR] /D:/Testing/first-benchmark/src/main/java/com/tri/MyBenchmark.java:[72,33] <identifier> expected
  37. [ERROR] /D:/Testing/first-benchmark/src/main/java/com/tri/MyBenchmark.java:[73,17] invalid method declaration; return type required
  38. [ERROR] /D:/Testing/first-benchmark/src/main/java/com/tri/MyBenchmark.java:[73,30] <identifier> expected
  39. [ERROR] /D:/Testing/first-benchmark/src/main/java/com/tri/MyBenchmark.java:[75,1] class, interface, or enum expected
Add Comment
Please, Sign In to add comment