Andreas Wundsam | 40e14f7 | 2013-05-06 14:49:08 -0700 | [diff] [blame^] | 1 | import org.openflow.protocol.match.MatchBuilderVer10; |
| 2 | import org.openflow.types.MacAddress; |
| 3 | import org.openflow.types.OFPort; |
| 4 | |
| 5 | |
| 6 | public 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 | } |