Return-Path: Delivered-To: apmail-incubator-directory-dev-archive@www.apache.org Received: (qmail 43372 invoked from network); 3 Feb 2005 02:46:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 3 Feb 2005 02:46:12 -0000 Received: (qmail 3729 invoked by uid 500); 3 Feb 2005 02:46:12 -0000 Delivered-To: apmail-incubator-directory-dev-archive@incubator.apache.org Received: (qmail 3685 invoked by uid 500); 3 Feb 2005 02:46:11 -0000 Mailing-List: contact directory-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list directory-dev@incubator.apache.org Received: (qmail 3670 invoked by uid 99); 3 Feb 2005 02:46:11 -0000 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=FROM_ENDS_IN_NUMS,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of aok123@bellsouth.net designates 205.152.59.67 as permitted sender) Received: from imf19aec.mail.bellsouth.net (HELO imf19aec.mail.bellsouth.net) (205.152.59.67) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 02 Feb 2005 18:46:11 -0800 Received: from [172.16.1.8] ([65.80.200.112]) by imf19aec.mail.bellsouth.net (InterMail vM.5.01.06.11 201-253-122-130-111-20040605) with ESMTP id <20050203024609.OFQV2048.imf19aec.mail.bellsouth.net@[172.16.1.8]> for ; Wed, 2 Feb 2005 21:46:09 -0500 Message-ID: <42019070.4070005@bellsouth.net> Date: Wed, 02 Feb 2005 21:46:08 -0500 From: Alex Karasulu User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Apache Directory Developers List Subject: Re: [jira] Created: (DIR-99) Bug in codesize.sh, & improvment References: <476902311.1107396137489.JavaMail.jira@ajax.apache.org> In-Reply-To: <476902311.1107396137489.JavaMail.jira@ajax.apache.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N With my faulty code I'm a very famous French author: Alexander Dumbass! Good catch I never considered classes with the same name in different packages overwriting one another. Doh! Thanks, Alex Emmanuel Lecharny (JIRA) wrote: >Bug in codesize.sh, & improvment >-------------------------------- > > Key: DIR-99 > URL: http://issues.apache.org/jira/browse/DIR-99 > Project: Directory > Type: Bug > Components: General > Environment: Unix/Linux > Reporter: Emmanuel Lecharny > Assigned to: Alex Karasulu > Priority: Trivial > > >The codesize script does not give the good count : if two java files have the same name in two different directories, the latest replace the previous one, thus the count is lost. > >I suggest to replace the followin lines : > > mkdir temp > for file in `find $trunk -type f -regex '.*\.java'`; do > cp $file temp; > done; > cd temp; > lines=`wc -l * | grep total | awk '{print $1}'`; > cd ../ > rm -rf temp; > >by this one : > > lines=$(for file in $(find $trunk -type f -name "*.java"); do wc -l $file; done | awk '{sum += $col} END {print sum}') > >Note that no more copy are made, leading to a small improvment in performance, and in disk occupation ;-) > >The result is : > >lines of code in ./ldap/trunk = 99208 (was 94685) >lines of code in ./sandbox/trunk = 3630 >lines of code in ./protocol/trunk = 583 >lines of code in ./dns/trunk = 4242 >lines of code in ./authx/trunk = 8325 (was 8109) >lines of code in ./naming/trunk = 15950 (was 15867) >lines of code in ./network/trunk = 14538 (was 14360) >lines of code in ./apacheds/trunk = 44670 >lines of code in ./ntp/trunk = 1618 >lines of code in ./asn1/trunk = 26796 (was 26752) >lines of code in ./kerberos/trunk = 13292 (was 13083) >lines of code in ./changepw/trunk = 2291 >lines of code in ./dhcp/trunk = 4911 >lines of code in ./apseda/trunk = 15177 >Total: 255231 (was 249978) > > > > > > > >