
|
If you were logged in you would be able to see more operations.
|
|
|
| Resolution Date: |
03/Feb/05 11:53 AM
|
|
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)
|
|
Description
|
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)
|
Show » |
| There are no subversion log entries for this issue yet.
|
|