Ejemplo n.º 1
0
 @Before
 public void setupProfiler() throws IOException {
   engine.getInstruments().get(TruffleProfiler.ID).setEnabled(true);
   TruffleProfiler.setTestHook(
       new TestHook() {
         public void onCreate(TruffleProfiler p) {
           profiler = p;
         }
       });
   assertEvalOut("", ""); // ensure profiler gets loaded
   Assert.assertNotNull(profiler);
 }
Ejemplo n.º 2
0
 @After
 public void clearTestHook() {
   // clear up otherwise test execution of others get affected
   TruffleProfiler.setTestHook(null);
 }