1 17 package org.alfresco.util.perf; 18 19 import java.lang.reflect.Method ; 20 21 import junit.framework.TestCase; 22 23 31 public class PerformanceMonitorTest extends TestCase 32 { 33 private PerformanceMonitor testTimingMonitor; 34 35 @Override 36 public void setUp() throws Exception 37 { 38 Method testTimingMethod = PerformanceMonitorTest.class.getMethod("testTiming"); 39 testTimingMonitor = new PerformanceMonitor("PerformanceMonitorTest", "testTiming"); 40 } 41 42 public void testSetUp() throws Exception 43 { 44 assertNotNull(testTimingMonitor); 45 } 46 47 public synchronized void testTiming() throws Exception 48 { 49 testTimingMonitor.start(); 50 51 wait(50); 52 53 testTimingMonitor.stop(); 54 } 55 } 56 | Popular Tags |