source: src/benchmark/creation/JavaThread.java @ 69ce455

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since 69ce455 was 50abab9, checked in by Thierry Delisle <tdelisle@…>, 7 years ago

Added benchmarks for java and go

  • Property mode set to 100644
File size: 462 bytes
RevLine 
[50abab9]1public class JavaThread {
2        public static class MyThread extends Thread {
3                @Override
4                public void run() {}
5        }
6
7        public static void main(String[] args) throws InterruptedException {
8                int NoOfTimes = 50000;
9                long start = System.nanoTime();
10                for(int i = 1; i <= NoOfTimes; i += 1) {
11                        JavaThread.MyThread m = new JavaThread.MyThread();
12                        m.start();
13                        m.join();
14                }
15                long end = System.nanoTime();
16                System.out.println( (end - start) / NoOfTimes);
17        }
18}
Note: See TracBrowser for help on using the repository browser.