public void addItem(Item item) { if (null == item) { ApiAlgs.getLog(this).error("Null item"); return; } if (null == item.getName()) { ApiAlgs.getLog(this).error("Null item name"); return; } m_items.put(item.getName(), item); }
public void release(PSI psi) throws EWrongPSI { long totalTime; boolean bInner; synchronized (m_profiler) { PSI e = m_stack.pop(); if (psi.getStackNumber() != e.getStackNumber()) { ApiAlgs.getLog(this) .error( psi.getGroup() + "." + psi.getItem() + " / " + e.getGroup() + "." + e.getItem()); while (psi.getStackNumber() < e.getStackNumber()) e = m_stack.pop(); } totalTime = m_timer.get() - psi.getCreationTime(); if (!m_stack.isEmpty()) { PSI parent = m_stack.peek(); parent.addChildTime(totalTime); } bInner = stackContainsItem(psi); } m_profiler.reportItem(psi.getGroup(), psi.getItem(), totalTime, psi.getChildsTime(), bInner); }