Package com.dianping.cat.consumer.event.model.entity

Examples of com.dianping.cat.consumer.event.model.entity.Range


  private void processEventGrpah(EventName name, Event t) {
    long current = t.getTimestamp() / 1000 / 60;
    int min = (int) (current % (60));

    synchronized (name) {
      Range range = name.findOrCreateRange(min);

      range.incCount();
      if (!t.isSuccess()) {
        range.incFails();
      }
    }
  }
View Full Code Here


      tranform = false;
    }

    if (tranform) {
      for (Entry<Integer, Range> entry : rangeMap.entrySet()) {
        Range range = entry.getValue();
        Range r = new Range(range.getValue()).setCount(range.getCount()).setFails(range.getFails());

        rangeMapCopy.put(entry.getKey(), r);
      }

      for (Entry<Integer, Range> entry : rangeMapCopy.entrySet()) {
        Range range = entry.getValue();
        minute = range.getValue();
        count = range.getCount() / 5;
        fails = range.getFails() / 5;

        for (int i = 0; i < 5; i++) {
          completeMinute = minute + i;

          eventName.findOrCreateRange(completeMinute).setCount(count).setFails(fails);
View Full Code Here

  }

  @Override
  public void visitRange(Range range) {
    m_currentRange = range.getValue();
    Range temp = m_report.findOrCreateMachine(m_currentIp).findOrCreateType(m_currentType)
          .findOrCreateName(m_currentName).findOrCreateRange(m_currentRange);

    m_merger.mergeRange(temp, range);

    Range all = m_report.findOrCreateMachine(m_currentIp).findOrCreateType(m_currentType)
          .findOrCreateName(Constants.ALL).findOrCreateRange(m_currentRange);

    m_merger.mergeRange(all, range);
    super.visitRange(range);
  }
View Full Code Here

  }

  @Override
  public void visitRange(Range range) {
    m_currentRange = range.getValue();
    Range temp = m_report.findOrCreateMachine(Constants.ALL).findOrCreateType(m_currentType)
          .findOrCreateName(m_currentName).findOrCreateRange(m_currentRange);

    m_merger.mergeRange(temp, range);
    super.visitRange(range);
  }
View Full Code Here

TOP

Related Classes of com.dianping.cat.consumer.event.model.entity.Range

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.