*/
@Test
@Ignore
public void testAddPerf() throws Exception
{
Dn dn = new Dn( "cn=test,ou=system" );
Entry entry = new DefaultEntry( getService().getSchemaManager(), dn,
"ObjectClass: top",
"ObjectClass: person",
"sn: TEST",
"cn: test" );
connection.add( entry );
int nbIterations = 8000;
//BufferedWriter out = new BufferedWriter( new FileWriter("/tmp/out.txt") );
long t0 = System.currentTimeMillis();
long t00 = 0L;
long tt0 = System.currentTimeMillis();
for ( int i = 0; i < nbIterations; i++ )
{
if ( i % 1000 == 0 )
{
long tt1 = System.currentTimeMillis();
System.out.println( i + ", " + ( tt1 - tt0 ) );
tt0 = tt1;
}
if ( i == 500 )
{
t00 = System.currentTimeMillis();
}
dn = new Dn( "uid=" + i + ",dc=example,dc=com" );
entry = new DefaultEntry(
getService().getSchemaManager(),
dn,
"objectClass: top",
"objectClass: person",