Package net.floodlightcontroller.debugcounter.DebugCounter

Examples of net.floodlightcontroller.debugcounter.DebugCounter.CounterIndexStore


    @Before
    public void setUp() throws Exception {
        dc = new DebugCounter();
        mctr = dc.moduleCounters;
        mctr.put("linkd", new ConcurrentHashMap<String, CounterIndexStore>());
        mctr.get("linkd").put("linkevent", dc.new CounterIndexStore(24, null));
        mctr.put("switch", new ConcurrentHashMap<String, CounterIndexStore>());
        exp = dc.new RetCtrInfo();
    }
View Full Code Here


    @Before
    public void setUp() throws Exception {
        dc = new DebugCounter();
        mctr = dc.moduleCounters;
        mctr.put("linkd", new ConcurrentHashMap<String, CounterIndexStore>());
        mctr.get("linkd").put("linkevent", dc.new CounterIndexStore(24, null));
        mctr.put("switch", new ConcurrentHashMap<String, CounterIndexStore>());
        exp = dc.new RetCtrInfo();
    }
View Full Code Here

    @Test
    public void testHierarchicalCounterGet1() {
        Map<String, CounterIndexStore> x =  mctr.get("switch");
        x.put("00:00:00:00:00:00:00:01",
              dc.new CounterIndexStore(10, null));

        // 1-level counter exists
        String counterName = "00:00:00:00:00:00:00:01";
        RetCtrInfo rci1 = dc.getCounterId("switch",counterName);
        exp.levels = counterName.split("/");
View Full Code Here

    @Test
    public void testHierarchicalCounterGet2() {
        Map<String, CounterIndexStore> x =  mctr.get("switch");
        // single level counter
        x.put("00:00:00:00:00:00:00:01",
              dc.new CounterIndexStore(10, null));
        // two level counter
        x.put("00:00:00:00:00:00:00:03",
              dc.new CounterIndexStore(30, new ConcurrentHashMap<String,CounterIndexStore>()));
        x.get("00:00:00:00:00:00:00:03").nextLevel.put("pktin",
                                                       dc.new CounterIndexStore(333, null));

        // 1-level counter exists
        String counterName = "00:00:00:00:00:00:00:01";
        RetCtrInfo rci1 = dc.getCounterId("switch",counterName);
        exp.levels = counterName.split("/");
View Full Code Here

    @Test
    public void testHierarchicalCounterGet3() {
        Map<String, CounterIndexStore> x =  mctr.get("switch");
        // single level counter
        x.put("00:00:00:00:00:00:00:01",
              dc.new CounterIndexStore(10, null));
        // two level counter
        x.put("00:00:00:00:00:00:00:03",
              dc.new CounterIndexStore(30, new ConcurrentHashMap<String,CounterIndexStore>()));
        x.get("00:00:00:00:00:00:00:03").nextLevel.put("pktin",
                                                       dc.new CounterIndexStore(333, null));
        // three level counter
        x.put("00:00:00:00:00:00:00:05",
              dc.new CounterIndexStore(50, new ConcurrentHashMap<String,CounterIndexStore>()));
        x.get("00:00:00:00:00:00:00:05")
            .nextLevel.put("pktin",
                           dc.new CounterIndexStore(555, new ConcurrentHashMap<String,CounterIndexStore>()));
        x.get("00:00:00:00:00:00:00:05").nextLevel.get("pktin").nextLevel.
            put("drops", dc.new CounterIndexStore(1056, null));

        // 1-level counter exists
        String counterName = "00:00:00:00:00:00:00:01";
        RetCtrInfo rci1 = dc.getCounterId("switch",counterName);
        exp.levels = counterName.split("/");
View Full Code Here

TOP

Related Classes of net.floodlightcontroller.debugcounter.DebugCounter.CounterIndexStore

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.