Return-Path: X-Original-To: apmail-sling-commits-archive@www.apache.org Delivered-To: apmail-sling-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3748CDCE9 for ; Thu, 12 Jul 2012 09:11:26 +0000 (UTC) Received: (qmail 13167 invoked by uid 500); 12 Jul 2012 09:11:26 -0000 Delivered-To: apmail-sling-commits-archive@sling.apache.org Received: (qmail 12826 invoked by uid 500); 12 Jul 2012 09:11:18 -0000 Mailing-List: contact commits-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sling.apache.org Delivered-To: mailing list commits@sling.apache.org Received: (qmail 12076 invoked by uid 99); 12 Jul 2012 09:11:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jul 2012 09:11:15 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jul 2012 09:10:34 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 0051823888E7; Thu, 12 Jul 2012 09:10:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1360589 - /sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderEntry.java Date: Thu, 12 Jul 2012 09:10:14 -0000 To: commits@sling.apache.org From: cziegeler@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120712091015.0051823888E7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cziegeler Date: Thu Jul 12 09:10:14 2012 New Revision: 1360589 URL: http://svn.apache.org/viewvc?rev=1360589&view=rev Log: Remove unused code Modified: sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderEntry.java Modified: sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderEntry.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderEntry.java?rev=1360589&r1=1360588&r2=1360589&view=diff ============================================================================== --- sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderEntry.java (original) +++ sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderEntry.java Thu Jul 12 09:10:14 2012 @@ -59,14 +59,6 @@ public class ResourceProviderEntry imple // below the path of this entry. private ProviderHandler[] providers = new ProviderHandler[0]; - private long ttime = 0L; - - private long nmiss = 0L; - - private long nsynthetic = 0L; - - private long nreal = 0L; - private final FastTreeMap storageMap = new FastTreeMap(); private Collection storageMapValues = new ArrayList(); @@ -273,7 +265,6 @@ public class ResourceProviderEntry imple try { if (fullPath == null || fullPath.length() == 0 || fullPath.charAt(0) != '/') { - nmiss++; LOGGER.debug("Not absolute {} :{}", fullPath, (System.currentTimeMillis() - start)); return null; // fullpath must be absolute } @@ -289,7 +280,6 @@ public class ResourceProviderEntry imple final Resource resource = rp.getResource(ctx, resourceResolver, fullPath); if (resource != null) { - nreal++; LOGGER.debug("Resolved Full {} using {} from {} ", new Object[] { fullPath, rp, Arrays.toString(rps) }); return resource; } @@ -308,20 +298,16 @@ public class ResourceProviderEntry imple // and there will be no resource provider at the end if (list.size() > 0 && list.size() == elements.length) { if (list.get(list.size() - 1).getResourceProviders().length == 0) { - nsynthetic++; LOGGER.debug("Resolved Synthetic {}", fullPath); return new SyntheticResource(resourceResolver, fullPath, ResourceProvider.RESOURCE_TYPE_SYNTHETIC); } } LOGGER.debug("Resource null {} ", fullPath); - nmiss++; return null; } catch (final Exception ex) { LOGGER.debug("Failed! ", ex); return null; - } finally { - ttime += System.currentTimeMillis() - start; } } @@ -330,7 +316,6 @@ public class ResourceProviderEntry imple for (final ProviderHandler rp : rps) { final Resource resource = rp.getResource(ctx, resourceResolver, fullPath); if (resource != null) { - nreal++; LOGGER.debug("Resolved Base {} using {} ", fullPath, rp); return resource; } @@ -382,22 +367,6 @@ public class ResourceProviderEntry imple return e; } - public String getResolutionStats() { - final long tot = nreal + nsynthetic + nmiss; - if (tot == 0) { - return null; - } - final float n = tot; - final float t = ttime; - final float persec = 1000 * n / t; - final float avgtime = t / n; - - final String stat = "Resolved: Real(" + nreal + ") Synthetic(" + nsynthetic + ") Missing(" + nmiss + ") Total(" + tot + ") at " - + persec + " ops/sec avg " + avgtime + " ms"; - ttime = nmiss = nsynthetic = nreal = 0L; - return stat; - } - /** * {@inheritDoc} *