Examples of startTimer()


Examples of org.jboss.test.timer.interfaces.TimerSLSB.startTimer()

      throws Exception
   {
      login();
      TimerSLSBHome home = (TimerSLSBHome) getEJBHome(TimerSLSBHome.SECURED_JNDI_NAME);
      TimerSLSB bean = home.create();
      byte[] handle = bean.startTimer(SHORT_PERIOD);
      // Sleep for 20x the timer interval and expect at least 10 events
      Thread.sleep(20 * SHORT_PERIOD);
      int count = bean.getTimeoutCount(handle);
      bean.stopTimer(handle);
      assertTrue("Timeout was expected to be called at least 10 times but was "
View Full Code Here

Examples of org.mindswap.pellet.utils.Timers.startTimer()

    }
    */
   
    /* Classify the ontology if necessary */
    if (!reasoner.isClassified()){
      Timer timerClassify = timers.startTimer( "classification" );
      reasoner.classify();
      timerClassify.stop();
      classificationTime = timerClassify.getTotal();
    }
   
View Full Code Here

Examples of org.mindswap.pellet.utils.Timers.startTimer()

      timers.createTimer("retrieval");
     
      System.out.println(reasoner.getEquivalentClasses(cc).size());
     
      /* retrieve all individuals of the class (direct and indirect individuals) */
      Timer timerRetrieval = timers.startTimer( "retrieval" );
      allIndividuals = reasoner.getIndividuals(cc, false);
      timerRetrieval.stop();
     
      /* update instance retrieval time */
      instanceRetrievalTime += timerRetrieval.getTotal();
View Full Code Here

Examples of org.mindswap.pellet.utils.Timers.startTimer()

      /* Initialize manager used for loading the Abox */
      OWLOntologyManager manager = null;
      manager = OWLManager.createOWLOntologyManager();

      /* Rewrite Tbox T -> T' based on the current vocabulary subset */
      Timer timerApproximation = timers.startTimer( "approximation" );
      ApproximationResult approximationResult = approximation.getNextTBox();
      timerApproximation.stop();
     
      if (approximationResult != null) {
        System.out.println("Creating Tbox approximation "+runCounter);
View Full Code Here

Examples of org.mindswap.pellet.utils.Timers.startTimer()

        /* Classify ontology if needed */
        double classificationTime = 0;
       
        if ( !(reasoner.isClassified()) ){
          logger.info("Classifying KB...");
          Timer timerClassify = timers.startTimer( "classification" );
          reasoner.classify();
          timerClassify.stop();
          classificationTime = timerClassify.getTotal();
        }
       
View Full Code Here

Examples of org.mindswap.pellet.utils.Timers.startTimer()

          Set<OWLIndividual> directIndividuals = new HashSet<OWLIndividual>();
           
          /* get all individuals (direct and indirect) of class cc only if the class is defined in the ontology */
          if (reasoner.isDefined(cc)){
            timers.createTimer("retrieval");
            Timer timerRetrieval = timers.startTimer( "retrieval" );
            individuals = reasoner.getIndividuals(cc, false);
            timerRetrieval.stop();
           
            /* get direct individuals only */
            directIndividuals = reasoner.getIndividuals(cc, true);
View Full Code Here

Examples of org.mindswap.pellet.utils.Timers.startTimer()

          if (isInterruptible){
            List<OWLOntologyChange> changesToMake = new Vector<OWLOntologyChange>();
            /* Add instances retrieved in the current run to the current Abox */
            OWLDataFactory factory = manager.getOWLDataFactory();
            timers.createTimer("aboxupdate");
            Timer timerAboxUpdate = timers.startTimer("aboxupdate");
            for (OWLIndividual ci : individuals){
              changesToMake.add(new AddAxiom(abox, factory.getOWLClassAssertionAxiom(ci, cc)));
            }
            List<OWLOntologyChange> actualChangesMade = manager.applyChanges(changesToMake);
            timerAboxUpdate.stop();
View Full Code Here

Examples of org.mindswap.pellet.utils.Timers.startTimer()

  public ApproximationResult getNextTBox(){
    org.mindswap.pellet.utils.Timers timers  = new Timers();
    timers.createTimer("selection");
   
    /* Selection contains concept names only */ 
    Timer timerSelection = timers.startTimer("selection");
    this.selection = this.strategy.getNextSelection();
    timerSelection.stop();
    long selectionTime = timerSelection.getTotal();
   
    if (this.selection == null){
View Full Code Here

Examples of org.mindswap.pellet.utils.Timers.startTimer()

      Set<OWLLogicalAxiom> axioms = this.fullTBox.getLogicalAxioms();
     
      /* Iterate over all logical axioms and rewrite them if necessary. Add each (possibly rewritten) axiom to
       * the approximated Tbix */
      //long axiomRewritingTimeStart = System.nanoTime();
      Timer timerRewrite = timers.startTimer("rewrite");
      for (OWLLogicalAxiom ca : axioms){
        //logger.info("Axiom: "+ca.toString());
        if (!(ca instanceof OWLClassAssertionAxiom) && !(ca instanceof OWLIndividualAxiom)){
          if (ca instanceof OWLSubClassAxiom){
            //logger.info("");
View Full Code Here

Examples of org.mindswap.pellet.utils.Timers.startTimer()

      // reasoner.loadOntologies(Collections.singleton(abox));
      /* Classify the ontology if necessary */
      if (!reasoner.isClassified())
      {
        /* Measure time using Benchmarking framework */
        Timer timerClassify = timers.startTimer("classification");
        reasoner.classify();
        timerClassify.stop();
        classificationTime = timerClassify.getTotal();
      }

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.