Package org.perf4j

Examples of org.perf4j.StopWatch.stop()


      return false;
    // replace the previous programNode with new nodes
    StopWatch stopWatch = new Log4JStopWatch("Adpative_toProgram2");
    String subProg = space.toProgram();

    stopWatch.stop();
    if (subProg == null || subProg.indexOf("null") != -1) {
      return false;
    }

    ProgramParser xParser = new ProgramParser();
View Full Code Here


  {
    StopWatch stopWatch0 = new Log4JStopWatch("adaptive_main");
    long t1 = System.currentTimeMillis();
    StopWatch stopWatch = new Log4JStopWatch("adaptive_producePartition");
    Vector<Partition> par = this.adaptive_producePartition();
    stopWatch.stop();
    StopWatch stopWatch1 = new Log4JStopWatch("adaptive_produceProgram");
    Collection<ProgramRule> cpr = this.adaptive_produceProgram(par);
    stopWatch1.stop();
    Traces.AllSegs.clear();
    //record the learning time
View Full Code Here

    StopWatch stopWatch = new Log4JStopWatch("adaptive_producePartition");
    Vector<Partition> par = this.adaptive_producePartition();
    stopWatch.stop();
    StopWatch stopWatch1 = new Log4JStopWatch("adaptive_produceProgram");
    Collection<ProgramRule> cpr = this.adaptive_produceProgram(par);
    stopWatch1.stop();
    Traces.AllSegs.clear();
    //record the learning time
    this.learnspan = System.currentTimeMillis()-t1;
    stopWatch0.stop();
    return cpr;
View Full Code Here

  public Collection<ProgramRule> run_main() {
    long t1 = System.currentTimeMillis();
    StopWatch stopWatch0 = new Log4JStopWatch("main");
    StopWatch stopWatch = new Log4JStopWatch("producePartition");
    Vector<Partition> vp = this.ProducePartitions(true);
    stopWatch.stop();
    StopWatch stopWatch1 = new Log4JStopWatch("producePrograms");
    Collection<ProgramRule> cpr = this.producePrograms(vp);
    stopWatch1.stop();
    Traces.AllSegs.clear();
    stopWatch0.stop();
View Full Code Here

    StopWatch stopWatch = new Log4JStopWatch("producePartition");
    Vector<Partition> vp = this.ProducePartitions(true);
    stopWatch.stop();
    StopWatch stopWatch1 = new Log4JStopWatch("producePrograms");
    Collection<ProgramRule> cpr = this.producePrograms(vp);
    stopWatch1.stop();
    Traces.AllSegs.clear();
    stopWatch0.stop();
    this.learnspan = System.currentTimeMillis()-t1;
    return cpr;
  }
View Full Code Here

      //InversionCounter counter = new InversionCounterStupidImpl();
      InversionCounter counter = new InversionCounterMergeImpl();
      StopWatch sw = new StopWatch("inversions count");
      sw.start();
      System.out.println("Inversions count: " + counter.count(ints));
      sw.stop();
      System.out.println("Count time: " + sw.getElapsedTime());
    } catch (IOException e) {
      e.printStackTrace();
    } finally{
      IOUtils.closeQuietly(arrayStream);
View Full Code Here

    //获取用户
    try {

      StopWatch dbStopWatch = new Slf4JStopWatch("GetUser.fetchDB");
      User entity = accountManager.getInitedUser(id);
      dbStopWatch.stop();

      UserDTO dto = dozer.map(entity, UserDTO.class);

      GetUserResult result = new GetUserResult();
      result.setUser(dto);
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.