Package org.apache.commons.lang.time

Examples of org.apache.commons.lang.time.StopWatch.start()


    mapper.map(src, destClass);

    // perform x number of additional mappings
    log.info("Begin timings for " + testName);
    StopWatch timer = new StopWatch();
    timer.start();
    for (int i = 0; i < numIters; i++) {
      mapper.map(src, destClass);
    }
    timer.stop();
    log.info("Total time for additional " + numIters + " mappings: " + timer.getTime() + " milliseconds");
View Full Code Here


  protected BindRegistry bindRegistry;

  public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
    StopWatch watch = new StopWatch();
    watch.start();
    bindRegistry = new DefinitionBindRegistry(registry);
    register(registry);
    autowire();
    logger.debug("Auto register and wire bean [{}]", newBeanDefinitions.keySet());
    logger.info("Auto register and wire {} beans using {} mills", newBeanDefinitions.size(),
View Full Code Here

@Test
public class AutoConfigProcessorTest {

  public void testGet() {
    StopWatch watch = new StopWatch();
    watch.start();
    ApplicationContext factory = new ClassPathXmlApplicationContext("/context-auto.xml");
    testBean(factory);
    testFactoryBean(factory);
    System.out.println("config  context-auto completed using " + watch.getTime());
  }
View Full Code Here

    System.out.println("config  context-auto completed using " + watch.getTime());
  }

  public void testNoAutowire() {
    StopWatch watch = new StopWatch();
    watch.start();
    ApplicationContext factory = new ClassPathXmlApplicationContext("/context-auto.xml");
    String name = SomeAction.class.getName();
    for (int i = 0; i < 100; i++) {
      factory.getBean(name);
    }
View Full Code Here

    int length = 0;
    long start = 0L;
    long begin = 0L;
    long stop = 0L;
    StopWatch watch = new StopWatch();
    watch.start();
    try {
      length = input.available();
      stop = length - 1;
      response.setContentLength(length);
      String rangestr = request.getHeader("Range");
View Full Code Here

  }

  public void initFrom(SessionFactory sessionFactory) {
    if (null != sessionFactory && entityTypes.isEmpty()) {
      StopWatch watch = new StopWatch();
      watch.start();
      Map<String, ClassMetadata> classMetadatas = sessionFactory.getAllClassMetadata();
      for (Iterator<ClassMetadata> iter = classMetadatas.values().iterator(); iter.hasNext();) {
        ClassMetadata cm = (ClassMetadata) iter.next();
        buildEntityType(sessionFactory, cm.getEntityName());
      }
View Full Code Here

  @Test(timeOut = 10000)
  public void testPerformance() throws Exception {
    DefaultPropertyExtractor extractor = new DefaultPropertyExtractor();
    StopWatch watch = new StopWatch();
    watch.start();
    for (int i = 0; i < 1000; i++) {
      extract(extractor);
    }
    // System.out.println(watch.getTime());
  }
View Full Code Here

  @Test(timeOut = 1000)
  public void testPerformance2() throws Exception {
    DefaultPropertyExtractor extractor = new DefaultPropertyExtractor();
    StopWatch watch = new StopWatch();
    watch.start();
    for (int i = 0; i < 1000; i++) {
      extract(extractor);
    }
    // System.out.println(watch.getTime());
  }
View Full Code Here

        SwingUtilities.invokeLater(new Runnable()
        {
            public void run()
            {
                StopWatch sw = new StopWatch();
                sw.start();
                glassPane.setVisible(true);
                String searchTerm = textField.getText();
                try
                {
                    frame.setCursor(new Cursor(Cursor.WAIT_CURSOR));
View Full Code Here

  private JSplitPane horizSplitPane;
  private JLogPanel logPanel;
 
  public JMainFrame(){
    StopWatch stopWatch = new StopWatch();
    stopWatch.start();
    log.info("Starting "+GuiClient.getApplicationName()+" Ver. "+GuiClient.getVersion());
    runSplash();
    ToolTipManager.sharedInstance().setDismissDelay (300000);
    initialize();
    closeSplash();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.