Package org.perf4j.log4j

Examples of org.perf4j.log4j.Log4JStopWatch


@Aspect
public abstract class ScopedTimingAspect extends org.perf4j.aop.ScopedTimingAspect {

    protected Log4JStopWatch newStopWatch(String loggerName, String levelName) {
        Level level = Level.toLevel(levelName, Level.INFO);
        return new Log4JStopWatch(Logger.getLogger(loggerName), level, level);
    }
View Full Code Here


* @author Alex Devine
*/
public class EjbTimingAspect extends AbstractEjbTimingAspect {   
    protected Log4JStopWatch newStopWatch(String loggerName, String levelName) {
        Level level = Level.toLevel(levelName, Level.INFO);
        return new Log4JStopWatch(Logger.getLogger(loggerName), level, level);
    }
View Full Code Here

@Aspect
public class TimingAspect extends ProfiledTimingAspect {

    protected Log4JStopWatch newStopWatch(String loggerName, String levelName) {
        Level level = Level.toLevel(levelName, Level.INFO);
        return new Log4JStopWatch(Logger.getLogger(loggerName), level, level);
    }
View Full Code Here

      for (Partition p : this.partitions) {
        if (p.tarNodes.get(0).size() == 0) {
          pr.addRule(p.label, "substr(value,0,0)");
          continue;
        }
        StopWatch stopWatch = new Log4JStopWatch("toProgram1");
        String rule = p.toProgram();
        stopWatch.stop();

        if (rule.contains("null"))
          return null;
        pr.addRule(p.label, rule);
        score += p.getScore();
View Full Code Here

  public boolean updateProgram(Patcher pat, GrammarTreeNode space) {
    if (space == null)
      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

    }
    return rules;
  }
  public Collection<ProgramRule> adaptive_main()
  {
    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
    this.learnspan = System.currentTimeMillis()-t1;
    stopWatch0.stop();
    return cpr;
View Full Code Here

    this.ruleNo = pars.size();
    return pars;
  }
  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();
    this.learnspan = System.currentTimeMillis()-t1;
    return cpr;
  }
View Full Code Here

*/
@Aspect
public class TimingAspect extends AbstractTimingAspect {
    protected Log4JStopWatch newStopWatch(String loggerName, String levelName) {
        Level level = Level.toLevel(levelName, Level.INFO);
        return new Log4JStopWatch(Logger.getLogger(loggerName), level, level);
    }
View Full Code Here

TOP

Related Classes of org.perf4j.log4j.Log4JStopWatch

Copyright © 2018 www.massapicom. 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.