Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 1 | package net.floodlightcontroller.perfmon; |
| 2 | |
| 3 | import java.util.List; |
| 4 | |
| 5 | import org.openflow.protocol.OFMessage; |
| 6 | |
| 7 | import net.floodlightcontroller.core.FloodlightContext; |
| 8 | import net.floodlightcontroller.core.IOFMessageListener; |
| 9 | import net.floodlightcontroller.core.IOFSwitch; |
| 10 | import net.floodlightcontroller.core.module.IFloodlightService; |
| 11 | |
| 12 | public interface IPktInProcessingTimeService extends IFloodlightService { |
| 13 | |
| 14 | /** |
| 15 | * Creates time buckets for a set of modules to measure their performance |
| 16 | * @param listeners The message listeners to create time buckets for |
| 17 | */ |
| 18 | public void bootstrap(List<IOFMessageListener> listeners); |
| 19 | |
| 20 | /** |
| 21 | * Stores a timestamp in ns. Used right before a service handles an |
| 22 | * OF message. Only stores if the service is enabled. |
| 23 | */ |
| 24 | public void recordStartTimeComp(IOFMessageListener listener); |
| 25 | |
| 26 | public void recordEndTimeComp(IOFMessageListener listener); |
| 27 | |
| 28 | public void recordStartTimePktIn(); |
| 29 | |
| 30 | public void recordEndTimePktIn(IOFSwitch sw, OFMessage m, FloodlightContext cntx); |
| 31 | |
| 32 | public boolean isEnabled(); |
| 33 | |
| 34 | public void setEnabled(boolean enabled); |
| 35 | |
| 36 | public CumulativeTimeBucket getCtb(); |
| 37 | } |