Commit 4f462759100364b88699ab352e57edd44fd5e0a0

Authored by adumas
1 parent 2c957380

new logs

src/main/java/net/floodlightcontroller/pelstats/PELStats.java
... ... @@ -120,28 +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 124 List<double[][]> calls=new ArrayList<double[][]>();
124 125 if (voipStatsMap.get(sw)!=null) {
  126 + System.out.println("@PELStats \tgetting voipstatsmap");
125 127 calls=new ArrayList<double[][]>(voipStatsMap.get(sw));
126 128 }
  129 + System.out.println("@PELStats \tadding stats");
127 130 calls.add(((StatisticVoIP)srb.getStatistic()).getStats());
  131 + System.out.println("@PELStats \tputting call");
128 132 voipStatsMap.put(sw, calls);
129 133  
130 134 }
131 135 if (srb.getStatistic().getType()==6){ //If we received a SIP message
132   - //System.out.println("@PELStats: SIP message received");
  136 + System.out.println("@PELStats: SIP message received");
133 137 if(enabledStatistics.containsKey(sw)){
134   - //System.out.println("@PELStats: enabledStatistics contains sw:"+sw);
  138 + System.out.println("@PELStats: \tenabledStatistics contains sw:"+sw);
135 139 if(enabledStatistics.get(sw).contains(new Integer(8))){ //And the switch have a queue metric enabled
136   - //System.out.println("@PELStats: enabledStatistics sw containts the 8th metric:");
  140 + System.out.println("@PELStats: \tenabledStatistics sw containts the 8th metric:");
137 141 int[] SwitchRTPPorts = ((StatisticVoIP_SIP)srb.getStatistic()).getRTPPorts();
138 142  
139   - //System.out.println("@PELStats: queueInfos:"+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)+" ");
140 144 if(queueInfos.get(sw).get(2)==1 || queueInfos.get(sw).get(2)==3){ //if we want to delete or modify existing queue
141   - //System.out.println("@PELStats: Modification or deletion");
  145 + System.out.println("@PELStats: \tModification or deletion");
142 146 for (int port : portsCallsMap.get(sw))
143 147 {
144   - //System.out.println("@PELStats: port modification or deletion: "+port);
  148 + System.out.println("@PELStats: \tport modification or deletion: "+port);
145 149 sendOFFlowMod(sw,port);
146 150 }
147 151 if(queueInfos.get(sw).get(2)==3){ //If we deleted the queue
... ... @@ -150,18 +154,18 @@ public class PELStats implements IFloodlightModule, IOFMessageListener, RestAPIP
150 154  
151 155  
152 156 }
153   - //System.out.println("@PELStats: intermission");
  157 + System.out.println("@PELStats: \tintermission");
154 158 if (queueInfos.get(sw).get(2)!=3 && SwitchRTPPorts!=null) {
155   - //System.out.println("@PELStats: Modification or addition");
  159 + System.out.println("@PELStats: \tModification or addition");
156 160 for (int port:SwitchRTPPorts){ //For each calls of the switch
157   - //System.out.println("@PELStats: Modification or addition for port: "+port);
  161 + System.out.println("@PELStats: \tModification or addition for port: "+port);
158 162  
159 163 if (portsCallsMap.get(sw)!=null){
160 164 List<Integer> portsCalls =new ArrayList<Integer>(portsCallsMap.get(sw));
161 165  
162   - //System.out.println("@PELStats: portsCalls created: "+portsCalls);
  166 + System.out.println("@PELStats: \tportsCalls created: "+portsCalls);
163 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
164   - //System.out.println("@PELStats: port add: "+port);
  168 + System.out.println("@PELStats: \tport add: "+port);
165 169 sendOFFlowMod(sw,port);
166 170  
167 171 //Updating the ports calls map
... ... @@ -171,7 +175,7 @@ public class PELStats implements IFloodlightModule, IOFMessageListener, RestAPIP
171 175 }
172 176 }
173 177 else{
174   - //System.out.println("@PELStats portsCalls==null");
  178 + System.out.println("@PELStats \tportsCalls==null");
175 179 List<Integer> portsCalls =new ArrayList<Integer>();
176 180 sendOFFlowMod(sw,port);
177 181  
... ... @@ -216,14 +220,20 @@ public class PELStats implements IFloodlightModule, IOFMessageListener, RestAPIP
216 220 }
217 221  
218 222 if(enabledStatistics.containsKey(sw)){
  223 + System.out.println("@PELStats contains key sw");
219 224 List<Integer> myList = enabledStatistics.get(sw);
  225 + System.out.println("@PELStats \tget stats");
220 226 if(!myList.contains(srb.getStatistic().getType()))
221 227 myList.add(srb.getStatistic().getType());
222 228 }else{
  229 + System.out.println("@PELStats don't contains key sw");
223 230 ArrayList<Integer> types = new ArrayList<Integer>();
  231 + System.out.println("@PELStats \tnew array");
224 232 types.add(srb.getStatistic().getType());
  233 + System.out.println("@PELStats \tget type");
225 234 enabledStatistics.put(sw, types);
226 235 }
  236 + System.out.println("@PELStats end");
227 237 }
228 238  
229 239 } catch (Exception e) {
... ...