Commit e2bdde2338b45ec646c5811d54d209868ae8f437
1 parent
ae2f215d
deleting debug display
Showing
2 changed files
with
33 additions
and
33 deletions
src/main/java/net/floodlightcontroller/pelstats/PELStats.java
| ... | ... | @@ -120,32 +120,32 @@ public class PELStats implements IFloodlightModule, IOFMessageListener, RestAPIP |
| 120 | 120 | |
| 121 | 121 | |
| 122 | 122 | if (srb.getStatistic().getType()==5){ |
| 123 | - System.out.println("@PELStats type 5"); | |
| 123 | + //System.out.println("@PELStats type 5"); | |
| 124 | 124 | List<double[][]> calls=new ArrayList<double[][]>(); |
| 125 | 125 | if (voipStatsMap.get(sw)!=null) { |
| 126 | - System.out.println("@PELStats \tgetting voipstatsmap"); | |
| 126 | + //System.out.println("@PELStats \tgetting voipstatsmap"); | |
| 127 | 127 | calls=new ArrayList<double[][]>(voipStatsMap.get(sw)); |
| 128 | 128 | } |
| 129 | - System.out.println("@PELStats \tadding stats"); | |
| 129 | + //System.out.println("@PELStats \tadding stats"); | |
| 130 | 130 | calls.add(((StatisticVoIP)srb.getStatistic()).getStats()); |
| 131 | - System.out.println("@PELStats \tputting call"); | |
| 131 | + //System.out.println("@PELStats \tputting call"); | |
| 132 | 132 | voipStatsMap.put(sw, calls); |
| 133 | 133 | |
| 134 | 134 | } |
| 135 | 135 | if (srb.getStatistic().getType()==6){ //If we received a SIP message |
| 136 | - System.out.println("@PELStats: SIP message received"); | |
| 136 | + //System.out.println("@PELStats: SIP message received"); | |
| 137 | 137 | if(enabledStatistics.containsKey(sw)){ |
| 138 | - System.out.println("@PELStats: \tenabledStatistics contains sw:"+sw); | |
| 138 | + //System.out.println("@PELStats: \tenabledStatistics contains sw:"+sw); | |
| 139 | 139 | if(enabledStatistics.get(sw).contains(new Integer(8))){ //And the switch have a queue metric enabled |
| 140 | - System.out.println("@PELStats: \tenabledStatistics sw containts the 8th metric:"); | |
| 140 | + //System.out.println("@PELStats: \tenabledStatistics sw containts the 8th metric:"); | |
| 141 | 141 | int[] SwitchRTPPorts = ((StatisticVoIP_SIP)srb.getStatistic()).getRTPPorts(); |
| 142 | 142 | |
| 143 | - System.out.println("@PELStats: \tqueueInfos:"+queueInfos.get(sw).get(0)+" "+queueInfos.get(sw).get(1)+" "+queueInfos.get(sw).get(2)+" "); | |
| 143 | + //System.out.println("@PELStats: \tqueueInfos:"+queueInfos.get(sw).get(0)+" "+queueInfos.get(sw).get(1)+" "+queueInfos.get(sw).get(2)+" "); | |
| 144 | 144 | if(queueInfos.get(sw).get(2)==1 || queueInfos.get(sw).get(2)==3){ //if we want to delete or modify existing queue |
| 145 | - System.out.println("@PELStats: \tModification or deletion"); | |
| 145 | + //System.out.println("@PELStats: \tModification or deletion"); | |
| 146 | 146 | for (int port : portsCallsMap.get(sw)) |
| 147 | 147 | { |
| 148 | - System.out.println("@PELStats: \tport modification or deletion: "+port); | |
| 148 | + //System.out.println("@PELStats: \tport modification or deletion: "+port); | |
| 149 | 149 | sendOFFlowMod(sw,port); |
| 150 | 150 | } |
| 151 | 151 | if(queueInfos.get(sw).get(2)==3){ //If we deleted the queue |
| ... | ... | @@ -154,18 +154,18 @@ public class PELStats implements IFloodlightModule, IOFMessageListener, RestAPIP |
| 154 | 154 | |
| 155 | 155 | |
| 156 | 156 | } |
| 157 | - System.out.println("@PELStats: \tintermission"); | |
| 157 | + //System.out.println("@PELStats: \tintermission"); | |
| 158 | 158 | if (queueInfos.get(sw).get(2)!=3 && SwitchRTPPorts!=null) { |
| 159 | - System.out.println("@PELStats: \tModification or addition"); | |
| 159 | + //System.out.println("@PELStats: \tModification or addition"); | |
| 160 | 160 | for (int port:SwitchRTPPorts){ //For each calls of the switch |
| 161 | - System.out.println("@PELStats: \tModification or addition for port: "+port); | |
| 161 | + //System.out.println("@PELStats: \tModification or addition for port: "+port); | |
| 162 | 162 | |
| 163 | 163 | if (portsCallsMap.get(sw)!=null){ |
| 164 | 164 | List<Integer> portsCalls =new ArrayList<Integer>(portsCallsMap.get(sw)); |
| 165 | 165 | |
| 166 | - System.out.println("@PELStats: \tportsCalls created: "+portsCalls); | |
| 166 | + //System.out.println("@PELStats: \tportsCalls created: "+portsCalls); | |
| 167 | 167 | if (!portsCalls.contains(new Integer(port))){ //if the call isn't already assigned to a queue and we want to add new calls to queue |
| 168 | - System.out.println("@PELStats: \tport add: "+port); | |
| 168 | + //System.out.println("@PELStats: \tport add: "+port); | |
| 169 | 169 | sendOFFlowMod(sw,port); |
| 170 | 170 | |
| 171 | 171 | //Updating the ports calls map |
| ... | ... | @@ -175,7 +175,7 @@ public class PELStats implements IFloodlightModule, IOFMessageListener, RestAPIP |
| 175 | 175 | |
| 176 | 176 | } |
| 177 | 177 | else{ |
| 178 | - System.out.println("@PELStats \tportsCalls==null"); | |
| 178 | + //System.out.println("@PELStats \tportsCalls==null"); | |
| 179 | 179 | List<Integer> portsCalls =new ArrayList<Integer>(); |
| 180 | 180 | sendOFFlowMod(sw,port); |
| 181 | 181 | |
| ... | ... | @@ -196,48 +196,48 @@ public class PELStats implements IFloodlightModule, IOFMessageListener, RestAPIP |
| 196 | 196 | |
| 197 | 197 | } |
| 198 | 198 | if (srb.getStatistic().getType()==7){ |
| 199 | - System.out.println("@PELStats stat7"); | |
| 199 | + //System.out.println("@PELStats stat7"); | |
| 200 | 200 | double mos= ((StatisticVoIP_CAC)srb.getStatistic()).getMos(); |
| 201 | 201 | sendThreshold(sw,mos,cntx); |
| 202 | - System.out.println("@PELStats \tthreshold sent"); | |
| 202 | + //System.out.println("@PELStats \tthreshold sent"); | |
| 203 | 203 | |
| 204 | 204 | List<double[]> cacStats = new ArrayList<double[]>(); |
| 205 | - System.out.println("@PELStats \tcacStat created"); | |
| 205 | + //System.out.println("@PELStats \tcacStat created"); | |
| 206 | 206 | double[] stats = ((StatisticVoIP_CAC)srb.getStatistic()).getStats(); |
| 207 | - System.out.println("@PELStats \tstats retrieved"); | |
| 207 | + //System.out.println("@PELStats \tstats retrieved"); | |
| 208 | 208 | if(cacStatsMap.get(sw)!=null){ |
| 209 | - System.out.println("@PELStats \tcacstatsmap!=null"); | |
| 209 | + // System.out.println("@PELStats \tcacstatsmap!=null"); | |
| 210 | 210 | cacStats =new ArrayList<double[]>(cacStatsMap.get(sw)); |
| 211 | - System.out.println("@PELStats \tcacstats retrieved"); | |
| 211 | + //System.out.println("@PELStats \tcacstats retrieved"); | |
| 212 | 212 | } |
| 213 | - System.out.println("@PELStats \tadding stats"); | |
| 213 | + //System.out.println("@PELStats \tadding stats"); | |
| 214 | 214 | cacStats.add(stats); |
| 215 | - System.out.println("@PELStats \tputting switch"); | |
| 215 | + //System.out.println("@PELStats \tputting switch"); | |
| 216 | 216 | cacStatsMap.put(sw,cacStats); |
| 217 | - System.out.println("@PELStats \tOK"); | |
| 217 | + //System.out.println("@PELStats \tOK"); | |
| 218 | 218 | |
| 219 | 219 | |
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | if(enabledStatistics.containsKey(sw)){ |
| 223 | - System.out.println("@PELStats contains key sw"); | |
| 223 | + //System.out.println("@PELStats contains key sw"); | |
| 224 | 224 | List<Integer> myList = enabledStatistics.get(sw); |
| 225 | - System.out.println("@PELStats \tget stats"); | |
| 225 | + //System.out.println("@PELStats \tget stats"); | |
| 226 | 226 | if(!myList.contains(srb.getStatistic().getType())) |
| 227 | 227 | myList.add(srb.getStatistic().getType()); |
| 228 | 228 | }else{ |
| 229 | - System.out.println("@PELStats don't contains key sw"); | |
| 229 | + //System.out.println("@PELStats don't contains key sw"); | |
| 230 | 230 | ArrayList<Integer> types = new ArrayList<Integer>(); |
| 231 | - System.out.println("@PELStats \tnew array"); | |
| 231 | + //System.out.println("@PELStats \tnew array"); | |
| 232 | 232 | types.add(srb.getStatistic().getType()); |
| 233 | - System.out.println("@PELStats \tget type"); | |
| 233 | + //System.out.println("@PELStats \tget type"); | |
| 234 | 234 | enabledStatistics.put(sw, types); |
| 235 | 235 | } |
| 236 | - System.out.println("@PELStats end"); | |
| 236 | + //System.out.println("@PELStats end"); | |
| 237 | 237 | } |
| 238 | 238 | |
| 239 | 239 | } catch (Exception e) { |
| 240 | - System.out.println("@PELStats: We have a problem:" + e.toString()); | |
| 240 | + //System.out.println("@PELStats: We have a problem:" + e.toString()); | |
| 241 | 241 | e.printStackTrace(); |
| 242 | 242 | } |
| 243 | 243 | } | ... | ... |
src/main/resources/web/js/main.js