[jbosscache-commits] JBoss Cache SVN: r6333 - in benchmarks/benchmark-fwk/trunk: conf and 1 other directories.
jbosscache-commits at lists.jboss.org
jbosscache-commits at lists.jboss.org
Fri Jul 18 11:02:20 EDT 2008
Author: mircea.markus
Date: 2008-07-18 11:02:20 -0400 (Fri, 18 Jul 2008)
New Revision: 6333
Added:
benchmarks/benchmark-fwk/trunk/src/org/cachebench/utils/PerNodeRollingFileAppender.java
Modified:
benchmarks/benchmark-fwk/trunk/conf/log4j.xml
benchmarks/benchmark-fwk/trunk/runNode.sh
Log:
enhanced logging
Modified: benchmarks/benchmark-fwk/trunk/conf/log4j.xml
===================================================================
--- benchmarks/benchmark-fwk/trunk/conf/log4j.xml 2008-07-18 15:00:44 UTC (rev 6332)
+++ benchmarks/benchmark-fwk/trunk/conf/log4j.xml 2008-07-18 15:02:20 UTC (rev 6333)
@@ -5,7 +5,7 @@
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<!-- The list of appenders -->
<!-- The rolling file appender -->
- <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
+ <appender name="FILE" class="org.cachebench.utils.PerNodeRollingFileAppender">
<param name="File" value="cachebench.log"/>
<param name="Append" value="true"/>
<param name="Threshold" value="TRACE"/>
Modified: benchmarks/benchmark-fwk/trunk/runNode.sh
===================================================================
--- benchmarks/benchmark-fwk/trunk/runNode.sh 2008-07-18 15:00:44 UTC (rev 6332)
+++ benchmarks/benchmark-fwk/trunk/runNode.sh 2008-07-18 15:02:20 UTC (rev 6333)
@@ -22,7 +22,7 @@
echo param [test config file] : configuration file to use with the cache product. Typically resides in './cache-products/XXX/conf/'
echo param [cluster size] : total number of nodes that will run tests.
echo
- echo Example: './runNode.sh 0 jbosscache-2.0.0 repl_async.xml 3' will start the 1st node running an instance of jbc2.0.0 on a cluster made out of 3 nodes, using the repl_async configuration.
+ echo Example: './runNode.sh 0 jbosscache-2.2.0 pess-repl-sync.xml 3' will start the 1st node running an instance of jbc2.0.0 on a cluster made out of 3 nodes, using the repl_async configuration.
exit 1
fi
Added: benchmarks/benchmark-fwk/trunk/src/org/cachebench/utils/PerNodeRollingFileAppender.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/utils/PerNodeRollingFileAppender.java (rev 0)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/utils/PerNodeRollingFileAppender.java 2008-07-18 15:02:20 UTC (rev 6333)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 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.cachebench.utils;
+
+import org.apache.log4j.RollingFileAppender;
+import org.cachebench.config.ClusterConfig;
+
+/**
+ * Apends an node instance identifier at the end of the filename.
+ *
+ * @author Mircea.Markus at jboss.com
+ */
+public class PerNodeRollingFileAppender extends RollingFileAppender
+{
+ ClusterConfig conf = new ClusterConfig();
+
+ @Override
+ public void setFile(String s) {
+ super.setFile(appendNodeIndex(s));
+ }
+
+ private String appendNodeIndex(String s) {
+ return s + "_" + conf.getCurrentNodeIndex();
+ }
+}
More information about the jbosscache-commits
mailing list