[jboss-cvs] JBoss Messaging SVN: r4661 - in trunk/tests/src/org/jboss/messaging/tests/performance: persistence/impl and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jul 7 17:09:47 EDT 2008
Author: clebert.suconic at jboss.com
Date: 2008-07-07 17:09:47 -0400 (Mon, 07 Jul 2008)
New Revision: 4661
Added:
trunk/tests/src/org/jboss/messaging/tests/performance/journal/impl/RealJournalImplNIOTest.java
Removed:
trunk/tests/src/org/jboss/messaging/tests/performance/journal/impl/RealJournalImplTest.java
Modified:
trunk/tests/src/org/jboss/messaging/tests/performance/journal/impl/JournalImplTestUnit.java
trunk/tests/src/org/jboss/messaging/tests/performance/persistence/impl/StorageManagerTimingTest.java
Log:
Tweaks
Modified: trunk/tests/src/org/jboss/messaging/tests/performance/journal/impl/JournalImplTestUnit.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/performance/journal/impl/JournalImplTestUnit.java 2008-07-07 18:17:11 UTC (rev 4660)
+++ trunk/tests/src/org/jboss/messaging/tests/performance/journal/impl/JournalImplTestUnit.java 2008-07-07 21:09:47 UTC (rev 4661)
@@ -37,6 +37,7 @@
* A RealJournalImplTest
*
* @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * @author <a href="mailto:Clebert.Suconic at jboss.com">Clebert Suconic</a>
*
*/
public abstract class JournalImplTestUnit extends JournalImplTestBase
@@ -52,11 +53,11 @@
public void testAddUpdateDeleteManyLargeFileSize() throws Exception
{
- final int numberAdds = 10000;
+ final int numberAdds = 1000;
- final int numberUpdates = 5000;
+ final int numberUpdates = 500;
- final int numberDeletes = 3000;
+ final int numberDeletes = 300;
long[] adds = new long[numberAdds];
@@ -79,8 +80,7 @@
deletes[i] = i;
}
- // This would take a long time with sync=true, and still validates the file.
- setup(10, 10 * 1024 * 1024, false);
+ setup(10, 10 * 1024 * 1024, true);
createJournal();
startJournal();
load();
@@ -96,11 +96,11 @@
public void testAddUpdateDeleteManySmallFileSize() throws Exception
{
- final int numberAdds = 10000;
+ final int numberAdds = 1000;
- final int numberUpdates = 5000;
+ final int numberUpdates = 500;
- final int numberDeletes = 3000;
+ final int numberDeletes = 300;
long[] adds = new long[numberAdds];
@@ -123,7 +123,7 @@
deletes[i] = i;
}
- setup(10, 10 * 1024, false);
+ setup(10, 10 * 1024, true);
createJournal();
startJournal();
load();
@@ -199,58 +199,6 @@
}
}
- public void internaltestSpeedNonTransactional() throws Exception
- {
- final long numMessages = 10000;
-
- int numFiles = (int)(((numMessages * 1024 + 512) / (10 * 1024 * 1024)) * 1.3);
-
- if (numFiles<2) numFiles = 2;
-
- log.debug("num Files=" + numFiles);
-
- Journal journal =
- new JournalImpl(10 * 1024 * 1024, numFiles, true, true, getFileFactory(),
- 5000, "jbm-data", "jbm", 5000, 120);
-
- journal.start();
-
- journal.load(new ArrayList<RecordInfo>(), null);
-
- log.debug("Adding data");
- byte[] data = new byte[700];
-
- long start = System.currentTimeMillis();
-
- for (int i = 0; i < numMessages; i++)
- {
- journal.appendAddRecord(i, (byte)0, data);
- }
-
- long end = System.currentTimeMillis();
-
- double rate = 1000 * (double)numMessages / (end - start);
-
- boolean failed = false;
-
- // If this fails it is probably because JournalImpl it is closing the files without waiting all the completes to arrive first
- assertFalse(failed);
-
-
- log.debug("Rate " + rate + " records/sec");
-
- journal.stop();
-
- journal =
- new JournalImpl(10 * 1024 * 1024, numFiles, true, true, getFileFactory(),
- 5000, "jbm-data", "jbm", 5000, 120);
-
- journal.start();
- journal.load(new ArrayList<RecordInfo>(), null);
- journal.stop();
-
- }
-
public void testSpeedTransactional() throws Exception
{
Journal journal =
@@ -305,7 +253,53 @@
}
+ private void internaltestSpeedNonTransactional() throws Exception
+ {
+ final long numMessages = 10000;
+
+ int numFiles = (int)(((numMessages * 1024 + 512) / (10 * 1024 * 1024)) * 1.3);
+
+ if (numFiles<2) numFiles = 2;
+
+ log.debug("num Files=" + numFiles);
+
+ Journal journal =
+ new JournalImpl(10 * 1024 * 1024, numFiles, true, true, getFileFactory(),
+ 5000, "jbm-data", "jbm", 5000, 120);
+
+ journal.start();
+
+ journal.load(new ArrayList<RecordInfo>(), null);
+
+ log.debug("Adding data");
+ byte[] data = new byte[700];
+
+ long start = System.currentTimeMillis();
+
+ for (int i = 0; i < numMessages; i++)
+ {
+ journal.appendAddRecord(i, (byte)0, data);
+ }
+
+ long end = System.currentTimeMillis();
+
+ double rate = 1000 * (double)numMessages / (end - start);
+
+ log.debug("Rate " + rate + " records/sec");
+
+ journal.stop();
+
+ journal =
+ new JournalImpl(10 * 1024 * 1024, numFiles, true, true, getFileFactory(),
+ 5000, "jbm-data", "jbm", 5000, 120);
+
+ journal.start();
+ journal.load(new ArrayList<RecordInfo>(), null);
+ journal.stop();
+
+ }
+
}
Copied: trunk/tests/src/org/jboss/messaging/tests/performance/journal/impl/RealJournalImplNIOTest.java (from rev 4658, trunk/tests/src/org/jboss/messaging/tests/performance/journal/impl/RealJournalImplTest.java)
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/performance/journal/impl/RealJournalImplNIOTest.java (rev 0)
+++ trunk/tests/src/org/jboss/messaging/tests/performance/journal/impl/RealJournalImplNIOTest.java 2008-07-07 21:09:47 UTC (rev 4661)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.messaging.tests.performance.journal.impl;
+
+import java.io.File;
+
+import org.jboss.messaging.core.journal.SequentialFileFactory;
+import org.jboss.messaging.core.journal.impl.NIOSequentialFileFactory;
+import org.jboss.messaging.core.logging.Logger;
+
+/**
+ *
+ * A RealJournalImplTest
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * @author <a href="mailto:clebert.suconic at jboss.com">Clebert Suconic</a>
+ *
+ */
+public class RealJournalImplNIOTest extends JournalImplTestUnit
+{
+ private static final Logger log = Logger.getLogger(RealJournalImplNIOTest.class);
+
+ protected String journalDir = System.getProperty("user.home") + "/journal-test";
+
+ protected SequentialFileFactory getFileFactory() throws Exception
+ {
+ File file = new File(journalDir);
+
+ log.debug("deleting directory " + journalDir);
+
+ deleteDirectory(file);
+
+ file.mkdir();
+
+ return new NIOSequentialFileFactory(journalDir);
+ }
+
+
+}
+
Deleted: trunk/tests/src/org/jboss/messaging/tests/performance/journal/impl/RealJournalImplTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/performance/journal/impl/RealJournalImplTest.java 2008-07-07 18:17:11 UTC (rev 4660)
+++ trunk/tests/src/org/jboss/messaging/tests/performance/journal/impl/RealJournalImplTest.java 2008-07-07 21:09:47 UTC (rev 4661)
@@ -1,60 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.messaging.tests.performance.journal.impl;
-
-import java.io.File;
-
-import org.jboss.messaging.core.journal.SequentialFileFactory;
-import org.jboss.messaging.core.journal.impl.NIOSequentialFileFactory;
-import org.jboss.messaging.core.logging.Logger;
-
-/**
- *
- * A RealJournalImplTest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @author <a href="mailto:clebert.suconic at jboss.com">Clebert Suconic</a>
- *
- */
-public class RealJournalImplTest extends JournalImplTestUnit
-{
- private static final Logger log = Logger.getLogger(RealJournalImplTest.class);
-
- protected String journalDir = System.getProperty("user.home") + "/journal-test";
-
- protected SequentialFileFactory getFileFactory() throws Exception
- {
- File file = new File(journalDir);
-
- log.debug("deleting directory " + journalDir);
-
- deleteDirectory(file);
-
- file.mkdir();
-
- return new NIOSequentialFileFactory(journalDir);
- }
-
-
-}
-
Modified: trunk/tests/src/org/jboss/messaging/tests/performance/persistence/impl/StorageManagerTimingTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/performance/persistence/impl/StorageManagerTimingTest.java 2008-07-07 18:17:11 UTC (rev 4660)
+++ trunk/tests/src/org/jboss/messaging/tests/performance/persistence/impl/StorageManagerTimingTest.java 2008-07-07 21:09:47 UTC (rev 4661)
@@ -278,11 +278,11 @@
totalRate += rate;
if (rates.length>1)
{
- log.debug( " Thread " + i + ": = " + rate + " inserts/sec (including commits)");
+ log.info( " Thread " + i + ": = " + rate + " inserts/sec (including commits)");
}
}
- log.debug( " Total rate : = " + totalRate + " inserts/sec (including commits)");
- log.debug("*************************************************************************");
+ log.info( " Total rate : = " + totalRate + " inserts/sec (including commits)");
+ log.info("*************************************************************************");
}
}
More information about the jboss-cvs-commits
mailing list