1 package br.com.ibnetwork.guara.pipeline.valve.audit; 2 3 4 import org.apache.avalon.framework.configuration.Configurable; 5 import org.apache.avalon.framework.configuration.Configuration; 6 import org.apache.avalon.framework.configuration.ConfigurationException; 7 8 import com.jamonapi.Monitor; 9 import com.jamonapi.MonitorFactory; 10 11 import br.com.ibnetwork.guara.pipeline.PipelineException; 12 import br.com.ibnetwork.guara.pipeline.valve.ValveSupport; 13 import br.com.ibnetwork.guara.rundata.RunData; 14 15 public class StartProfiler 16 extends ValveSupport 17 implements Configurable 18 { 19 private String label; 20 21 public void configure(Configuration conf) 22 throws ConfigurationException 23 { 24 label = conf.getChild("profiler").getAttribute("label"); 25 } 26 27 protected boolean execute(RunData data) 28 throws PipelineException 29 { 30 Monitor global = MonitorFactory.start(label); 31 data.getContext().put(label,global); 32 return true; 33 } 34 }