KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > cjdbc > scenario > tools > GenerateTrace


1 /**
2  * C-JDBC: Clustered JDBC.
3  * Copyright (C) 2005 Emic Networks.
4  * Contact: c-jdbc@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU Lesser General Public License as published by the
8  * Free Software Foundation; either version 2.1 of the License, or any later
9  * version.
10  *
11  * This library is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
14  * for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this library; if not, write to the Free Software Foundation,
18  * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
19  *
20  * Initial developer(s): Emmanuel Cecchet.
21  * Contributor(s): ______________________.
22  */

23
24 package org.objectweb.cjdbc.scenario.tools;
25
26 /**
27  * This class defines a GenerateTrace
28  *
29  * @author <a HREF="mailto:emmanuel.cecchet@emicnetworks.com">Emmanuel Cecchet
30  * </a>
31  * @version 1.0
32  */

33 public class GenerateTrace
34 {
35
36   /**
37    * Generate a request player trace
38    *
39    * @param args none
40    */

41   public static void main(String JavaDoc[] args)
42   {
43     for (int i = 1; i < 1000000; i++)
44     {
45       System.out.println("00:00:00,000 myDB B " + i);
46       System.out.println("00:00:00,000 myDB W " + i
47           + " INSERT INTO foo VALUES (" + (i * 10) + ")");
48       System.out.println("00:00:00,000 myDB W " + i
49           + " INSERT INTO foo VALUES (" + (i * 10 + 1) + ")");
50       System.out.println("00:00:00,000 myDB W " + i
51           + " INSERT INTO foo VALUES (" + (i * 10 + 2) + ")");
52       System.out.println("00:00:00,000 myDB W " + i
53           + " INSERT INTO foo VALUES (" + (i * 10 + 3) + ")");
54       System.out.println("00:00:00,000 myDB W " + i
55           + " INSERT INTO foo VALUES (" + (i * 10 + 4) + ")");
56       System.out.println("00:00:00,000 myDB W " + i
57           + " INSERT INTO foo VALUES (" + (i * 10 + 5) + ")");
58       System.out.println("00:00:00,000 myDB W " + i
59           + " INSERT INTO foo VALUES (" + (i * 10 + 6) + ")");
60       System.out.println("00:00:00,000 myDB W " + i
61           + " INSERT INTO foo VALUES (" + (i * 10 + 7) + ")");
62       System.out.println("00:00:00,000 myDB W " + i
63           + " INSERT INTO foo VALUES (" + (i * 10 + 8) + ")");
64       System.out.println("00:00:00,000 myDB W " + i
65           + " INSERT INTO foo VALUES (" + (i * 10 + 9) + ")");
66       System.out.println("00:00:00,000 myDB C " + i);
67     }
68   }
69 }
70
Popular Tags