Home | History | Annotate | Download | only in ui
      1 /*******************************************************************************
      2  * Copyright (c) 2000, 2009 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.performance.ui;
     12 
     13 import org.eclipse.equinox.app.IApplication;
     14 import org.eclipse.equinox.app.IApplicationContext;
     15 import org.eclipse.test.internal.performance.results.db.DB_Results;
     16 
     17 /**
     18  * Main class to generate performance results of all scenarios matching a given pattern
     19  * in one HTML page per component.
     20  *
     21  * @see GenerateResults for the complete implementation
     22  */
     23 public class Main implements IApplication {
     24 
     25 /**
     26  * Generate the performance results for a specified build regarding to a specific reference.
     27  * This action generates following HTML files:
     28  * <ul>
     29  * <li>A summary table to see the variations for all the concerned scenarios</li>
     30  * <li>A global php file including global scenario fingerprints and links for all concerned components results php files</li>
     31  * <li>A php file for each component including scenario fingerprints and status table with links to a scenario data file</li>
     32  * <li>A data HTML file for each config of each scenario included in status table</li>
     33  * </ul>
     34  * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
     35  */
     36 public Object start(IApplicationContext context) throws Exception {
     37 	DB_Results.DB_CONNECTION = true; // force DB connection while running the application
     38 	GenerateResults generation = new GenerateResults();
     39 	String[] args = (String[]) context.getArguments().get("application.args");
     40 	generation.run(args);
     41 	return null;
     42 }
     43 
     44 /* (non-Javadoc)
     45  * @see org.eclipse.equinox.app.IApplication#stop()
     46  */
     47 public void stop() {
     48 	// Do nothing
     49 }
     50 }