01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.wicket.threadtest;
18:
19: import java.util.Arrays;
20: import java.util.List;
21:
22: import org.apache.commons.logging.Log;
23: import org.apache.commons.logging.LogFactory;
24: import org.apache.wicket.threadtest.tester.SimpleGetCommand;
25: import org.apache.wicket.threadtest.tester.Tester;
26: import org.apache.wicket.util.io.WicketObjectStreamFactory;
27: import org.apache.wicket.util.lang.Objects;
28:
29: /**
30: * @author eelcohillenius
31: */
32: public class App1Test1 {
33:
34: private static final Log log = LogFactory.getLog(App1Test1.class);
35:
36: /**
37: * @param args
38: * @throws Exception
39: */
40: public static void main(String[] args) throws Exception {
41:
42: List<String> gets = Arrays
43: .asList(new String[] {
44: "/app1/?wicket:bookmarkablePage=:wicket.threadtest.apps.app1.Home",
45: "/app1/?wicket:interface=:${iteration}:link::ILinkListener:",
46: "/app1/?wicket:interface=:${iteration}:link:1:ILinkListener:",
47: "/app1/?wicket:interface=:${iteration}:link:2:ILinkListener:" });
48:
49: // you can turn this on if you e.g. want to attach to a profiler
50: // Thread.sleep(5000);
51:
52: Objects.setObjectStreamFactory(new WicketObjectStreamFactory());
53: SimpleGetCommand getCmd = new SimpleGetCommand(gets, 10);
54: // getCmd.setPrintResponse(true);
55: Tester tester = new Tester(getCmd, 1000, true);
56: tester.run();
57: }
58: }
|