directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r491730 - /directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/schema/DeepTrimNormalizerTest.java
Date Tue, 02 Jan 2007 01:23:47 GMT
Author: elecharny
Date: Mon Jan  1 17:23:46 2007
New Revision: 491730

URL: http://svn.apache.org/viewvc?view=rev&rev=491730
Log:
Added a speed test (but it is commented)

Modified:
    directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/schema/DeepTrimNormalizerTest.java

Modified: directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/schema/DeepTrimNormalizerTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/schema/DeepTrimNormalizerTest.java?view=diff&rev=491730&r1=491729&r2=491730
==============================================================================
--- directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/schema/DeepTrimNormalizerTest.java
(original)
+++ directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/schema/DeepTrimNormalizerTest.java
Mon Jan  1 17:23:46 2007
@@ -163,4 +163,31 @@
 
        assertEquals( "  ", normalizer.normalize( new String( chars ) ) );
    }
+
+	/*
+   public void testSpeed() throws Exception
+   {
+       Normalizer normalizer = new DeepTrimNormalizer();
+       char[] chars = new char[]{ 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0085, 0x00A0, 0x1680,
+           0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009,
0x200A,
+           0x2028, 0x2029, 0x202F, 0x205F };
+       String s = new String( chars );
+       assertEquals( "  ", normalizer.normalize( s ) );
+       
+       String t = "xs crvtbynujikl7897790";
+       
+       Normalizer normalizer2 = new DeepTrimToLowerNormalizer();
+
+       long t0 = System.currentTimeMillis();
+
+       for ( int i = 0; i < 1000000; i++ )
+       {
+           normalizer.normalize( t );
+       }
+       
+       long t1 = System.currentTimeMillis();
+       
+       System.out.println( t1 - t0 );
+   }
+	*/
 }



Mime
View raw message