blob: e83700d38397f643ea20fc07ec5a104f6704c3f3 [file] [log] [blame]
Andreas Wundsam40e14f72013-05-06 14:49:08 -07001import org.openflow.protocol.match.MatchBuilderVer10;
2import org.openflow.types.MacAddress;
3import org.openflow.types.OFPort;
4
5
6public class Test {
7
8 private static volatile OFPort port;
9 private static volatile MacAddress ethSrc;
10
11 /**
12 * @param args
13 */
14 public static void main(String[] args) {
15 MacAddress mac = MacAddress.of("01:02:03:04:05:06");
16
17 long start = System.currentTimeMillis();
18 for(int i=0; i < 10000000; i++) {
19 MatchBuilderVer10 m = new MatchBuilderVer10();
20 // m.set(MatchField.IN_PORT, OFPort.CONTROLLER);
21 m.setInputPort(OFPort.CONTROLLER);
22 port = m.getInputPort(); //m.get(MatchField.IN_PORT);
23 m.setDataLayerSource(mac);
24 ethSrc = m.getDataLayerSource(); //(MatchField.ETH_SRC);
25 }
26 long end = System.currentTimeMillis();
27 System.out.println("end-start: "+ (end-start));
28 }
29
30}