blob: 80dfda0e43c136cfe5a0850eff874eb4e48acfa9 [file] [log] [blame]
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -08001package net.floodlightcontroller.perfmon;
2
3import java.util.List;
4
5import org.openflow.protocol.OFMessage;
6
7import net.floodlightcontroller.core.FloodlightContext;
8import net.floodlightcontroller.core.IOFMessageListener;
9import net.floodlightcontroller.core.IOFSwitch;
10import net.floodlightcontroller.core.module.IFloodlightService;
11
12public 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}