Author: pferraro
Date: 2009-05-17 16:45:35 -0400 (Sun, 17 May 2009)
New Revision: 2427
Removed:
trunk/mod_cluster/src/demo/java/org/jboss/modcluster/demo/servlet/ThreadCountLoadServlet.java
Modified:
trunk/mod_cluster/src/demo/java/org/jboss/modcluster/demo/client/ModClusterDemo.java
trunk/mod_cluster/src/demo/java/org/jboss/modcluster/demo/client/load/ServerLoadServlets.java
Log:
Remove thread count load servlet since it no longer has a corresponding metric
Renamed "Connection Pool Use" to "Connector Thread Use"
Modified:
trunk/mod_cluster/src/demo/java/org/jboss/modcluster/demo/client/ModClusterDemo.java
===================================================================
---
trunk/mod_cluster/src/demo/java/org/jboss/modcluster/demo/client/ModClusterDemo.java 2009-05-17
03:41:56 UTC (rev 2426)
+++
trunk/mod_cluster/src/demo/java/org/jboss/modcluster/demo/client/ModClusterDemo.java 2009-05-17
20:45:35 UTC (rev 2427)
@@ -529,10 +529,10 @@
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
loadPanel.add(targetLoadServletCombo, gridBagConstraints);
- targetLoadServletCombo.setSelectedItem(ServerLoadServlets.CONNECTION_POOL_USAGE);
- selectedLoadServlet = ServerLoadServlets.CONNECTION_POOL_USAGE;
+ targetLoadServletCombo.setSelectedItem(ServerLoadServlets.CONNECTOR_THREAD_USAGE);
+ selectedLoadServlet = ServerLoadServlets.CONNECTOR_THREAD_USAGE;
- ServerLoadParam param =
ServerLoadServlets.CONNECTION_POOL_USAGE.getParams().get(0);
+ ServerLoadParam param =
ServerLoadServlets.CONNECTOR_THREAD_USAGE.getParams().get(0);
targetServletParamLabel1 = new JLabel();
targetServletParamLabel1.setText(param.getLabel() + ":");
@@ -551,7 +551,7 @@
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
loadPanel.add(targetServletParamField1, gridBagConstraints);
- param = ServerLoadServlets.CONNECTION_POOL_USAGE.getParams().get(1);
+ param = ServerLoadServlets.CONNECTOR_THREAD_USAGE.getParams().get(1);
targetServletParamLabel2 = new JLabel();
targetServletParamLabel2.setText(param.getLabel() + ":");
Modified:
trunk/mod_cluster/src/demo/java/org/jboss/modcluster/demo/client/load/ServerLoadServlets.java
===================================================================
---
trunk/mod_cluster/src/demo/java/org/jboss/modcluster/demo/client/load/ServerLoadServlets.java 2009-05-17
03:41:56 UTC (rev 2426)
+++
trunk/mod_cluster/src/demo/java/org/jboss/modcluster/demo/client/load/ServerLoadServlets.java 2009-05-17
20:45:35 UTC (rev 2427)
@@ -46,7 +46,7 @@
new ServerLoadParam("duration", "Duration",
"Number of seconds to hold the connections
before returning to datasource", "15")),
- CONNECTION_POOL_USAGE("Connection Pool Use",
+ CONNECTOR_THREAD_USAGE("Connector Thread Use",
"Generates server load by tieing up threads in the
webserver connections pool for a period",
"connectors",
new ServerLoadParam("count", "Number of
Connections",
@@ -65,15 +65,7 @@
"cpu",
new ServerLoadParam("duration", "Duration",
"Number of seconds to maintain CPU usage",
"15")),
-
- THREAD_USAGE("Thread Use",
- "Generates server load by spawning threads (which do nothing but
sleep)",
- "database",
- new ServerLoadParam("count", "Number of Threads",
- "Number of threads to spawn",
"50"),
- new ServerLoadParam("duration", "Duration",
- "Number of seconds threads should live before
exiting", "15")),
-
+
RECEIVE_TRAFFIC_USAGE("Server Receive Traffic",
"Generates server traffic receipt load by POSTing a large
byte array to the server once per second for a period",
"receive",
Deleted:
trunk/mod_cluster/src/demo/java/org/jboss/modcluster/demo/servlet/ThreadCountLoadServlet.java
===================================================================
---
trunk/mod_cluster/src/demo/java/org/jboss/modcluster/demo/servlet/ThreadCountLoadServlet.java 2009-05-17
03:41:56 UTC (rev 2426)
+++
trunk/mod_cluster/src/demo/java/org/jboss/modcluster/demo/servlet/ThreadCountLoadServlet.java 2009-05-17
20:45:35 UTC (rev 2427)
@@ -1,72 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.modcluster.demo.servlet;
-
-import java.io.IOException;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * @author Paul Ferraro
- *
- */
-public class ThreadCountLoadServlet extends LoadServlet
-{
- /** The serialVersionUID */
- private static final long serialVersionUID = 4975054340996769991L;
-
- /**
- * @{inheritDoc}
- * @see javax.servlet.http.HttpServlet#service(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
- */
- @Override
- protected void service(HttpServletRequest request, HttpServletResponse response)
throws IOException
- {
- final int duration = Integer.parseInt(this.getParameter(request, DURATION,
DEFAULT_DURATION)) * 1000;
-
- int count = Integer.parseInt(this.getParameter(request, COUNT, "50"));
-
- for (int i = 0; i < count; ++i)
- {
- Thread thread = new Thread()
- {
- @Override
- public void run()
- {
- try
- {
- Thread.sleep(duration);
- }
- catch (InterruptedException e)
- {
- this.interrupt();
- }
- }
- };
-
- thread.start();
- }
-
- this.writeLocalName(request, response);
- }
-}