1 /******************************************************************************* 2 * Copyright (c) 2005 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.test.internal.performance.tests; 12 13 import junit.framework.TestCase; 14 15 import org.eclipse.test.internal.performance.OSPerformanceMeter; 16 import org.eclipse.test.performance.Performance; 17 import org.eclipse.test.performance.PerformanceMeter; 18 19 public class SimplePerformanceMeterTest extends TestCase { 20 21 public void testPerformanceMeterFactory() { 22 PerformanceMeter meter= Performance.getDefault().createPerformanceMeter("scenarioId"); //$NON-NLS-1$ 23 24 assertTrue(meter instanceof OSPerformanceMeter); 25 26 meter.start(); 27 meter.stop(); 28 29 meter.commit(); 30 31 meter.dispose(); 32 } 33 34 } 35