コード例 #1
0
 @Override
 public void recordEndTimeComp(IOFMessageListener listener) {
   if (isEnabled()) {
     long procTime = System.nanoTime() - startTimeCompNs;
     ctb.updateOneComponent(listener, procTime);
   }
 }
コード例 #2
0
  @Override
  @LogMessageDoc(
      level = "WARN",
      message = "Time to process packet-in exceeded threshold: {}",
      explanation = "Time to process packet-in exceeded the configured " + "performance threshold",
      recommendation = LogMessageDoc.CHECK_CONTROLLER)
  public void recordEndTimePktIn(IOFSwitch sw, OFMessage m, FloodlightContext cntx) {
    if (isEnabled()) {
      long procTimeNs = System.nanoTime() - startTimePktNs;
      ctb.updatePerPacketCounters(procTimeNs);

      if (ptWarningThresholdInNano > 0 && procTimeNs > ptWarningThresholdInNano) {
        logger.warn("Time to process packet-in exceeded threshold: {}", procTimeNs / 1000);
      }
    }
  }