コード例 #1
0
        /**
         * Returns the ProfileMethod for the given method name
         */
        protected ProfileMethod getMethod(String name)
        {
            ProfileMethod method = _methodMap.get(name);

            if (method == null)
            {
                method = new ProfileMethod(_methodMap.size(), name);
                _methodMap.put(name, method);
            }

            return(method);
        }
コード例 #2
0
        /**
         * Adds a profile item.
         */
        public void addItem(String name, string parent, long count, long micros)
        {
            ProfileItem item = new ProfileItem(name, parent, count, micros);

            _itemList.add(item);

            ProfileMethod method = getMethod(name);

            method.addParent(item);

            if ("__top__".equals(name))
            {
                _totalMicros = item.getMicros();
            }
            else
            {
                ProfileMethod parentMethod = getMethod(parent);
                parentMethod.addChild(item);
            }
        }