You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2008/01/16 20:56:02 UTC
svn commit: r612559 [7/8] - in /activemq/sandbox/activemq-log-analyzer: ./
example_logs/ example_logs/correct/ example_logs/incorrect/
loganalyzerengine/ loganalyzergui/ winxp_screenshots/
Added: activemq/sandbox/activemq-log-analyzer/example_logs/incorrect/producer
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-log-analyzer/example_logs/incorrect/producer?rev=612559&view=auto
==============================================================================
--- activemq/sandbox/activemq-log-analyzer/example_logs/incorrect/producer (added)
+++ activemq/sandbox/activemq-log-analyzer/example_logs/incorrect/producer Wed Jan 16 11:55:49 2008
@@ -0,0 +1,225 @@
+2007-10-30 21:11:30,848 [main ] DEBUG Connection:1 - $$ SENDING: WireFormatInfo
+2007-10-30 21:11:30,852 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: WireFormatInfo
+2007-10-30 21:11:30,861 [main ] DEBUG Connection:1 - $$ SENDING: ConnectionInfo T ID:david-laptop-45483-1193775090722-0:0
+2007-10-30 21:11:30,866 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: BrokerInfo F
+2007-10-30 21:11:30,866 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:30,875 [main ] DEBUG Connection:1 - $$ SENDING: ConsumerInfo T
+2007-10-30 21:11:30,880 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:30,915 [main ] DEBUG Connection:1 - $$ SENDING: SessionInfo F
+2007-10-30 21:11:30,950 [main ] DEBUG Connection:1 - $$ SENDING: ProducerInfo F
+2007-10-30 21:11:30,968 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:1,5,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:31,028 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:32,030 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:2,6,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:32,033 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:33,034 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:3,7,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:33,036 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:34,037 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:4,8,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:34,039 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:35,040 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:5,9,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:35,042 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:36,042 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:6,10,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:36,045 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:37,046 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:7,11,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:37,047 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:38,048 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:8,12,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:38,049 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:39,050 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:9,13,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:39,052 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:40,052 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:10,14,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:40,054 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:41,056 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:11,15,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:41,057 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:42,058 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:12,16,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:42,060 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:43,060 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:13,17,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:43,065 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:44,065 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:14,18,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:44,067 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:45,068 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:15,19,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:45,071 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:46,072 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:16,20,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:46,073 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:47,074 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:17,21,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:47,075 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:48,076 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:18,22,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:48,078 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:49,080 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:19,23,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:49,082 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:50,082 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:20,24,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:50,084 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:51,085 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:21,25,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:51,087 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:52,089 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:22,26,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:52,092 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:53,093 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:23,27,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:53,095 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:54,095 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:24,28,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:54,098 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:55,099 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:25,29,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:55,100 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:56,101 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:26,30,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:56,103 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:57,106 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:27,31,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:57,108 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:58,108 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:28,32,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:58,110 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:11:59,111 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:29,33,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:11:59,115 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:00,116 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:30,34,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:00,117 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:01,118 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:31,35,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:01,120 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:02,121 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:32,36,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:02,124 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:03,125 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:33,37,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:03,127 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:04,127 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:34,38,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:04,131 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:05,132 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:35,39,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:05,133 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:06,134 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:36,40,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:06,135 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:07,136 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:37,41,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:07,141 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:08,142 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:38,42,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:08,145 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:09,145 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:39,43,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:09,149 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:10,150 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:40,44,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:10,153 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:11,154 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:41,45,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:11,155 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:12,156 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:42,46,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:12,161 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:13,161 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:43,47,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:13,163 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:14,165 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:44,48,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:14,166 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:15,167 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:45,49,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:15,168 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:16,169 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:46,50,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:16,170 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:17,171 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:47,51,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:17,173 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:18,174 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:48,52,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:18,175 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:19,176 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:49,53,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:19,177 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:20,178 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:50,54,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:20,179 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:21,180 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:51,55,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:21,181 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:22,182 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:52,56,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:22,184 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:23,184 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:53,57,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:23,186 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:24,186 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:54,58,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:24,189 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:25,189 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:55,59,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:25,191 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:26,191 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:56,60,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:26,192 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:27,193 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:57,61,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:27,195 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:28,196 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:58,62,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:28,198 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:29,199 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:59,63,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:29,200 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:30,201 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:60,64,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:30,203 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:31,204 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:61,65,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:31,205 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:32,206 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:62,66,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:32,207 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:33,208 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:63,67,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:33,209 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:34,210 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:64,68,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:34,211 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:35,212 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:65,69,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:35,213 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:36,214 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:66,70,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:36,215 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:37,216 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:67,71,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:37,218 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:38,219 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:68,72,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:38,222 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:39,222 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:69,73,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:39,224 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:40,224 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:70,74,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:40,226 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:41,227 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:71,75,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:41,228 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:42,229 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:72,76,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:42,230 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:43,231 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:73,77,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:43,233 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:44,233 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:74,78,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:44,235 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:45,235 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:75,79,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:45,237 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:46,238 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:76,80,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:46,239 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:47,240 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:77,81,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:47,242 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:48,242 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:78,82,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:48,244 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:49,246 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:79,83,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:49,247 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:50,248 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:80,84,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:50,249 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:51,250 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:81,85,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:51,251 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:52,252 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:82,86,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:52,254 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:53,255 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:83,87,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:53,257 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:54,258 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:84,88,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:54,260 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:55,261 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:85,89,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:55,263 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:56,264 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:86,90,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:56,266 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:57,267 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:87,91,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:57,271 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:58,272 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:88,92,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:58,275 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:12:59,276 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:89,93,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:12:59,278 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:13:00,279 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:90,94,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:13:00,280 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:13:01,282 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:91,95,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:13:01,283 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:13:02,287 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:92,96,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:13:02,290 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:13:03,291 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:93,97,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:13:03,292 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:13:04,294 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:94,98,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:13:04,295 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:13:05,296 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:95,99,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:13:05,298 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:13:06,301 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:96,100,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:13:06,303 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:13:07,303 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:97,101,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:13:07,307 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:13:08,312 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:98,102,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:13:08,314 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:13:09,314 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:99,103,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:13:09,316 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:13:10,317 [main ] DEBUG Connection:1 - $$ SENDING: ActiveMQTextMessage T ID:david-laptop-45483-1193775090722-0:0:1:1:100,104,ID:david-laptop-45483-1193775090722-0:0,1,1,null,null
+2007-10-30 21:13:10,319 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:13:11,400 [main ] DEBUG Connection:1 - $$ SENDING: RemoveInfo F
+2007-10-30 21:13:11,400 [main ] DEBUG Connection:1 - $$ SENDING: RemoveInfo T
+2007-10-30 21:13:11,404 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED: Response F
+2007-10-30 21:13:11,408 [main ] DEBUG Connection:1 - $$ SENDING: ShutdownInfo F
+2007-10-30 21:13:11,412 [127.0.0.1:61616] DEBUG Connection:1 - $$ RECEIVED_EXCEPTION: java.net.SocketException: Socket closed
+java.net.SocketException: Socket closed
+ at java.net.SocketInputStream.socketRead0(Native Method)
+ at java.net.SocketInputStream.read(SocketInputStream.java:129)
+ at org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:50)
+ at org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:58)
+ at java.io.DataInputStream.readInt(DataInputStream.java:353)
+ at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:268)
+ at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:197)
+ at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:189)
+ at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:177)
+ at java.lang.Thread.run(Thread.java:595)
Added: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Connection.py
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Connection.py?rev=612559&view=auto
==============================================================================
--- activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Connection.py (added)
+++ activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Connection.py Wed Jan 16 11:55:49 2008
@@ -0,0 +1,354 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
+
+"""
+Module Connection
+"""
+import itertools
+
+class Connection(object):
+ """
+ This class represents an ActiveMQ Connection.
+ It also stores a collection of the connections
+ that have been read in the log files.
+
+ A Connection's id is the ActiveMQConnection's id. Since this is usually a long
+ alphanumerical string, it is called 'longId'.
+ Each new Connection gets also assigned an integer 'shortId' automatically.
+ The function of this 'shortId' is to make understanding of displayed data easier.
+
+ A Connection has 2 LogFile members, who represent:
+ -the log file of the JVM that initiates a connection.
+ -the log file of the JVM that receives a connection request.
+
+ The purpose of every Connection is to store the following data:
+
+ -messages sent through this connection, as a dictionary where the
+ key is a tuple (message, direction) and the value is
+ a list of timestamps. If the message was sent only one time (normal case),
+ the timestamp list will have 1 item only.
+
+ -messages received through this connection, as a dictionary
+ analogous to the previous one.
+
+ -messages sent but not received through this connection, as a list of
+ tuples (storedMessage, ntimes, timestamps).
+ 'storedMessage' is a (message, direction) tuple
+ ntimes, an integer, is the number of times a message was sent but not received
+ timestamps is a list of timestamps of when the message was sent or received.
+ For a message to be in this list, ntimes must be >= 1.
+
+ -messages received but not sent through this connection.
+ Analog to previous point.
+
+ -messages sent more than 2 more times through this connection, as a list of
+ tuples (storedMessage, ntimes, timestamps).
+ 'storedMessage' is a (message, direction) tuple
+ ntimes, an integer, is the number of times a message was sent.
+ timestamps is a list of timestamps of when the message was sent.
+ For a message to be in this list, ntimes must be >= 2.
+
+ -messages received more than 2 more times through this connection.
+ Identical structure to the previous point.
+
+ The 'direction' value is either True or False.
+ True represents that the message was sent from the JVM writing to the
+ 'from' file, to the JVM writing to the 'to' file.
+ False represents the opposite.
+ """
+
+ #dictionary whose keys are connection ids, and whose values
+ #are Connection objects
+ connections = {}
+ nConnections = 0
+ connectionIdList = []
+
+ def __init__(self, longId, fromFile = None, toFile = None):
+ """
+ Constructs a Connection object.
+ longId : string
+ fromFile: LogFile object
+ to: LogFile object
+ The ActiveMQConnection's id has to be provided.
+ Optionally, 2 LogFile objects can be provided.
+ The 'from' file is the log file of the JVM that initiates a connection.
+ The 'to' file is the log file of the JVM that receives a connection request.
+
+ A new connection gets automatically a new 'shortId', which is an integer.
+ The longId gets also stored in a list of longIds.
+
+ Returns a Connection object.
+ """
+
+ self.longId = longId
+ self.fromFile = fromFile
+ self.toFile = toFile
+
+ self.shortId = Connection.nConnections
+ Connection.connectionIdList.append(longId)
+ Connection.nConnections += 1
+
+ self.producers = set()
+ self.consumers = set()
+
+ self.sent = {}
+ self.received = {}
+
+ self.duplicateSent = None
+ self.duplicateReceived = None
+ self.sentButNotReceived = None
+ self.receivedButNotSent = None
+
+ self.calculated = False
+
+ @classmethod
+ def clearData(cls):
+ """
+ Deletes all information read about connections.
+
+ Returns nothing.
+ """
+
+ cls.connections.clear()
+ cls.nConnections = 0
+ del cls.connectionIdList[:]
+
+ @classmethod
+ def getConnectionByLongId(cls, longId):
+ """
+ Retrieves the connection whose id is 'longId'.
+ If there is no connection with this id, a new
+ one is created with this id.
+
+ Returns a Connection object.
+ """
+
+ if longId not in cls.connections:
+ cls.connections[longId] = Connection(longId)
+
+ return cls.connections[longId]
+
+ @classmethod
+ def getConnectionByShortId(cls, shortId):
+ """
+ Retrieves the connection whose shortId is 'shortId'.
+ If there is no connection with this id,
+ an IndexError exception will be thrown.
+
+ Returns a Connection object.
+ Throws an IndexError if the short id does not exist.
+ """
+
+ return cls.connections[cls.connectionIdList[shortId]]
+
+ @classmethod
+ def shortIdToLongId(cls, shortId):
+ """
+ Transforms a connection's short id to a long id.
+ Returns the long id.
+ Throws an IndexError if the short id does not exist.
+ """
+ return cls.connectionIdList[shortId]
+
+ @classmethod
+ def longIdToShortId(cls, longId):
+ """
+ Transforms a connection's long id to a short id.
+ Returns the short id.
+ Throws an KeyError if the short id does not exist.
+ """
+ try:
+ return cls.connections[longId].shortId
+ except KeyError:
+ print longId
+ print cls.connections
+ raise
+
+ @classmethod
+ def setFrom(cls, longId, fromFile):
+ """
+ Sets the 'from' LogFile object for the connection whose id is 'longId'.
+ The 'from' file is the log file of the JVM that initiates a connection.
+ If there is not yet a connection whose id is 'longId', a new one is
+ created with this longId and this 'from' file.
+
+ Returns nothing.
+ """
+
+ if longId not in cls.connections:
+ cls.connections[longId] = Connection(longId, fromFile = fromFile)
+ else:
+ cls.connections[longId].fromFile = fromFile
+
+ @classmethod
+ def setTo(cls, longId, toFile):
+ """
+ Sets the 'to' LogFile object for the connection whose id is 'longId'.
+ The 'to' file is the log file of the JVM that receives a connection request.
+ If there is not yet a connection whose id is 'longId', a new one is
+ created with this longId and this 'to' file.
+
+ Returns nothing.
+ """
+
+ if longId not in cls.connections:
+ cls.connections[longId] = Connection(longId, toFile = toFile)
+ else:
+ cls.connections[longId].toFile = toFile
+
+
+
+ @classmethod
+ def exists(cls, longId):
+ """
+ Returns if there is a connection whose id is 'longId'
+ """
+
+ return longId in cls.connections
+
+
+
+ def addProducer(self, producer):
+ """
+ Adds a producer to the set of this connection's producers.
+ Returns nothing.
+ """
+ self.producers.add(producer)
+
+ def addConsumer(self, consumer):
+ """
+ Adds a consumer to the set of this connection's consumers.
+ Returns nothing.
+ """
+ self.consumers.add(consumer)
+
+ def addSentMessage(self, message, direction, timestamp):
+ """
+ Adds a message to the set of messages sent through this connection.
+ message: a Message object
+ direction: True if this message was sent from self.fromFile to self.to
+ False if this message was sent from self.toFile to self.fromFile
+ timestamp: a string with the time this message was sent
+
+ If the message has already been sent in this direction, it gets added to the
+ collection of duplicate sent messages.
+
+ Returns nothing.
+ """
+
+ storedMessage = (message, direction)
+
+ if storedMessage in self.sent:
+ self.sent[storedMessage].append(timestamp)
+ else:
+ self.sent[storedMessage] = [timestamp]
+
+ def addReceivedMessage(self, message, direction, timestamp):
+ """
+ Adds a message to the set of messages received through this connection.
+ message: a message object
+ direction: True if this message was sent from self.fromFile to self.to
+ False if this message was sent from self.toFile to self.fromFile
+ timestamp: a string with the time this message was sent
+
+ If the message has already been received in this direction, it gets added to the
+ collection of duplicate received messages.
+
+ Returns nothing.
+ """
+
+ storedMessage = (message, direction)
+
+ if storedMessage in self.received:
+ self.received[storedMessage].append(timestamp)
+ else:
+ self.received[storedMessage] = [timestamp]
+
+ def getErrors(self):
+ """
+ Processes the data previously gathered to find incorrect situations.
+
+ Returns a 4-tuple with:
+ -collection of sent but not received messages, through this Connection.
+ This collection is a list of (storedMessage, ntimes, timestamps) tuples where:
+ *'storedMessage' is a (message, direction) tuple.
+ *'ntimes' is an integer, representing how many times the message was sent but not received.
+ *'timestamps' is a list of strings with the timestamps when this message was sent / received.
+
+ -collection of received but not sent messages, through this Connection.
+ This collection is a list of (storedMessage, ntimes, timestamps) tuples where:
+ *'storedMessage' is a (message, direction) tuple.
+ *'ntimes' is an integer, representing how many times the message was received but not sent.
+ *'timestamps' is a list of strings with the timestamps when this message was sent / received.
+
+ -collection of duplicate sent messages, through this Connection.
+ This collection is a list of (message, timestamps) tuples where:
+ *'storedMessage' is a (shortId, commandId, direction) tuple.
+ *'ntimes' is an integer, representing how many times the message sent.
+ *'timestamps' is a list of strings with the timestamps when this message was sent.
+
+ -collection of duplicate received messages, through this Connection.
+ This collection is a list of (message, timestamps) tuples where:
+ *'storedMessage' is a (message, direction) tuple.
+ *'ntimes' is an integer, representing how many times the message received.
+ *'timestamps' is a list of strings with the timestamps when this message was received.
+
+ The data is only calculated once, and then successive calls of this method return always
+ the same erros unles self.calculated is set to False.
+ """
+
+ if not self.calculated:
+ self.sentButNotReceived = []
+ for message, timestamps in self.sent.iteritems():
+ if message not in self.received:
+ self.sentButNotReceived.append((message, len(timestamps), timestamps))
+ else:
+ difference = len(timestamps) - len(self.received[message])
+ if difference > 0:
+ self.sentButNotReceived.append((message, difference,
+ itertools.chain(timestamps, self.received[message])))
+
+ self.receivedButNotSent = []
+ for message, timestamps in self.received.iteritems():
+ if message not in self.sent:
+ self.receivedButNotSent.append((message, len(timestamps), timestamps))
+ else:
+ difference = len(timestamps) - len(self.sent[message])
+ if difference > 0:
+ self.receivedButNotSent.append((message, difference,
+ itertools.chain(timestamps, self.sent[message])))
+
+ self.duplicateSent = [(message, len(timestamps), timestamps)
+ for message, timestamps in self.sent.iteritems() if len(timestamps) > 1]
+ self.duplicateReceived = [(message, len(timestamps), timestamps)
+ for message, timestamps in self.received.iteritems() if len(timestamps) > 1]
+
+ self.sentButNotReceived.sort(key = lambda message: (message[0][0].producer.shortId, message[0][0].prodSeqId))
+ self.receivedButNotSent.sort(key = lambda message: (message[0][0].producer.shortId, message[0][0].prodSeqId))
+ self.duplicateSent.sort(key = lambda message: (message[0][0].producer.shortId, message[0][0].prodSeqId))
+ self.duplicateReceived.sort(key = lambda message: (message[0][0].producer.shortId, message[0][0].prodSeqId))
+
+ self.calculated = True
+
+ return self.sentButNotReceived, self.receivedButNotSent, self.duplicateSent, self.duplicateReceived
+
+ def __str__(self):
+ """
+ Represents this Connection object as a string.
+ """
+
+ return ''.join([self.longId, ' from:', str(self.fromFile), ' to:', str(self.toFile)])
Propchange: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Connection.py
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Connection.pyc
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Connection.pyc?rev=612559&view=auto
==============================================================================
Binary file - no diff available.
Propchange: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Connection.pyc
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Consumer.py
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Consumer.py?rev=612559&view=auto
==============================================================================
--- activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Consumer.py (added)
+++ activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Consumer.py Wed Jan 16 11:55:49 2008
@@ -0,0 +1,93 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
+
+"""
+Module Consumer
+"""
+
+class Consumer(object):
+ """
+ This class represents an ActiveMQ Consumer.
+ Each consumer is identified by its long id.
+ However each consumer also has a short id (an integer) to identify it more easily.
+ """
+
+ nConsumers = 0
+ consumerIdList = []
+ consumers = {}
+
+ def __init__(self, longId):
+ """
+ Constructor
+ """
+
+ self.longId = longId
+ self.shortId = Consumer.nConsumers
+
+ self.connectionId, sessionId, value = longId.rsplit(':', 2)
+ self.sessionId = int(sessionId)
+ self.value = int(value)
+
+ Consumer.consumers[longId] = self
+ Consumer.consumerIdList.append(self.longId)
+ Consumer.nConsumers += 1
+
+ @classmethod
+ def clearData(cls):
+ """
+ Deletes all information read about Consumers.
+
+ Returns nothing.
+ """
+
+ cls.consumers.clear()
+ cls.nConsumers = 0
+ del cls.consumerIdList[:]
+
+ @classmethod
+ def getConsumerByLongId(cls, longId):
+ """
+ Returns a consumer given its long id.
+ If there is no consumer with this long id yet, it will be created.
+ """
+
+ if longId not in cls.consumers:
+ cls.consumers[longId] = Consumer(longId)
+
+ return cls.consumers[longId]
+
+ @classmethod
+ def shortIdToLongId(cls, shortId):
+ """
+ Transforms a consumer's short id to a long id.
+
+ Returns a long id.
+ Throws an IndexError if the short id does not exist.
+ """
+
+ return cls.consumerIdList[shortId]
+
+ @classmethod
+ def longIdToShortId(cls, longId):
+ """
+ Transforms a consumer's long id to a short id.
+
+ Returns a long id.
+ Throws an KeyError if the long id does not exist.
+ """
+ return cls.consumers[longId].shortId
+
Propchange: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Consumer.py
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Consumer.pyc
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Consumer.pyc?rev=612559&view=auto
==============================================================================
Binary file - no diff available.
Propchange: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Consumer.pyc
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/LogFile.py
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-log-analyzer/loganalyzerengine/LogFile.py?rev=612559&view=auto
==============================================================================
--- activemq/sandbox/activemq-log-analyzer/loganalyzerengine/LogFile.py (added)
+++ activemq/sandbox/activemq-log-analyzer/loganalyzerengine/LogFile.py Wed Jan 16 11:55:49 2008
@@ -0,0 +1,204 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
+
+"""
+Module LogFile
+"""
+import os
+
+class LogFile(object):
+ """
+ Class that represents an ActiveMQ log file read by the application.
+ It also stores a list of all the LogFile objects.
+
+ A LogFile object stores the following information:
+ -A list of 'outgoing' Connection objects that represent the connections
+ created by the JVM that writes this LogFile.
+ -A list of 'incoming' Connection objects that represent the connections
+ requests received by the JVM that writes this LogFile.
+
+ -A dictionary of messages that were sent in this file.
+ The keys are Message objects and the values
+ are lists of timestamps of when the message was sent.
+ -A list of messages that were received in this file.
+ The keys are Message objects and the values
+ are lists of timestamps of when the message was received.
+
+ -A list of messages that were sent in this file more than 1 time (duplicates)
+ The list is made of (message, ntimes, timestamps) tuples.
+ -A list of messages that were received in this file more than 1 time (duplicates),
+ analogous to the previous structure.
+ """
+
+ logfiles = []
+
+ def __init__(self, path):
+ """
+ Constructs a LogFile object.
+ path: a string with the path to the ActiveMQ log file.
+ """
+
+ self.__path = os.path.abspath(path)
+ self.file = open(self.__path, 'r')
+ self.outgoing = []
+ self.incoming = []
+
+ self.sent = {}
+ self.received = {}
+
+ self.duplicateReceived = None
+ self.duplicateSent = None
+
+ self.calculated = False
+
+ LogFile.logfiles.append(self)
+
+ @classmethod
+ def clearData(cls):
+ """
+ Class method erases all the LogFile objects stored in the LogFile class.
+ Returns nothing.
+ """
+
+ del cls.logfiles[:]
+
+ @classmethod
+ def closeFiles(cls):
+ """
+ Class method that closes all the LogFile objects stored in the LogFile class.
+ Returns nothing.
+ """
+
+ for logFile in cls.logfiles:
+ logFile.file.close()
+
+
+
+ def addOutgoingConnection(self, con):
+ """
+ Adds an 'outgoing' Connection object to this LogFile.
+ Returns nothing.
+ """
+
+ self.outgoing.append(con)
+
+ def addIncomingConnection(self, con):
+ """
+ Adds an 'incoming' Connection object to this LogFile.
+ Returns nothing.
+ """
+
+ self.incoming.append(con)
+
+ def addSentMessage(self, message, timestamp):
+ """
+ Adds a message to the set of messages that were sent thtough this file.
+ If a message gets sent 2 times, it gets added to the set of duplicate sent messages.
+ message: a Message object.
+ timestamp: a string with the time where this message was sent.
+
+ Returns nothing.
+ """
+
+ if message in self.sent:
+ self.sent[message].append(timestamp)
+ else:
+ self.sent[message] = [timestamp]
+
+ def addReceivedMessage(self, message, timestamp):
+ """
+ Adds a message to the set of messages that were received in this file.
+ If a message gets sent 2 times, it gets added to the set of duplicate received messages.
+ message: a Message object.
+ timestamp: a string with the time where this message was sent.
+
+ Returns nothing.
+ """
+
+ #message = (shortProdId, prodSeqId, False)
+ if message in self.received:
+ self.received[message].append(timestamp)
+ else:
+ self.received[message] = [timestamp]
+
+ def getErrors(self):
+ """
+ Returns a 2-tuple with:
+ -a list of (message, ntimes, timestamps) tuples, with the duplicate sent messages
+ that appear in more than one connection in this file.
+ 'message' is a Message object.
+ 'ntimes' is an integer stating how many times the message was sent ( always >= 2)
+ 'timestamps' is a list of timestamps with the instants the message was sent.
+
+ -a list of (message, ntimes, timestamps) tuples, with the duplicate received messages
+ that appear in more than one connection in this file.
+ Structure analogous to previous one.
+
+ The data is only calculated once, and then successive calls of this method return always
+ the same erros unles self.calculated is set to False.
+ """
+
+ if not self.calculated:
+
+ duplicateSentTemp = [(message, len(timestamps), timestamps)
+ for message, timestamps in self.sent.iteritems() if len(timestamps) > 1]
+ self.duplicateSent = []
+
+ for message, _, timestamps in duplicateSentTemp:
+ connections = []
+ for connection, direction in message.sendingConnections:
+ if direction and connection.fromFile == self \
+ or not direction and connection.toFile == self:
+ connections.append(connection)
+ if len(connections) > 1:
+ self.duplicateSent.append((message, len(timestamps), timestamps))
+
+ duplicateReceivedTemp = [(message, len(timestamps), timestamps)
+ for message, timestamps in self.received.iteritems() if len(timestamps) > 1]
+ self.duplicateReceived = []
+
+ for message, _, timestamps in duplicateReceivedTemp:
+ connections = []
+ for connection, direction in message.receivingConnections:
+ if direction and connection.toFile == self \
+ or not direction and connection.fromFile == self:
+ connections.append(connection)
+ if len(connections) > 1:
+ self.duplicateReceived.append((message, len(timestamps), timestamps))
+
+ self.duplicateSent.sort(key = lambda message: (message[0].producer.shortId, message[0].prodSeqId))
+ self.duplicateReceived.sort(key = lambda message: (message[0].producer.shortId, message[0].prodSeqId))
+
+ self.calculated = True
+
+ return self.duplicateSent, self.duplicateReceived
+
+ def close(self):
+ """
+ Closes the underlying file.
+ Returns nothing.
+ """
+
+ self.file.close()
+
+ def __str__(self):
+ """
+ Returns a string representation of this object.
+ """
+
+ return self.__path
+
Propchange: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/LogFile.py
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/LogFile.pyc
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-log-analyzer/loganalyzerengine/LogFile.pyc?rev=612559&view=auto
==============================================================================
Binary file - no diff available.
Propchange: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/LogFile.pyc
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/LogParser.py
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-log-analyzer/loganalyzerengine/LogParser.py?rev=612559&view=auto
==============================================================================
--- activemq/sandbox/activemq-log-analyzer/loganalyzerengine/LogParser.py (added)
+++ activemq/sandbox/activemq-log-analyzer/loganalyzerengine/LogParser.py Wed Jan 16 11:55:49 2008
@@ -0,0 +1,205 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
+
+"""
+Module LogParser
+"""
+import os, sys, time
+
+from LogFile import LogFile
+from Connection import Connection
+from Producer import Producer
+from Consumer import Consumer
+from Message import Message
+
+MESSAGE_TYPES = frozenset(['ActiveMQBytesMessage', 'ActiveMQTextMessage'])
+DISPATCH_MESSAGE = 'MessageDispatch'
+ADVISORY_TEXT = 'Advisory'
+CONSUMER_TEXT = 'toConsumer:'
+
+class LogParser(object):
+ """
+ This class is in charge of parsing the log files and storing the data
+ as Connection, LogFile and Message objects.
+ """
+
+ instance = None
+
+ @classmethod
+ def getInstance(cls):
+ """
+ Returns the sole instance of the class.
+ """
+
+ if cls.instance is None:
+ cls.instance = LogParser()
+ return cls.instance
+
+ @classmethod
+ def deleteInstance(cls):
+ """
+ Deletes the sole instance of the class
+ """
+
+ cls.instance = None
+
+ def parse (self, logFile):
+ """
+ Parses the information in a log file.
+ logFile should be a LogFile object.
+
+ Returns nothing.
+ """
+ try:
+ for line in logFile.file:
+ loggedMessage = line.partition('$$ ')[2]
+ if loggedMessage != '':
+ spacedStrings = loggedMessage.split()
+
+ if spacedStrings[1] == 'ConnectionInfo':
+ connectionId = spacedStrings[3]
+
+ if spacedStrings[0] == 'SENDING:':
+ logFile.addOutgoingConnection(Connection.getConnectionByLongId(connectionId))
+ Connection.setFrom(connectionId, logFile)
+
+ elif spacedStrings[0] == 'RECEIVED:':
+ logFile.addIncomingConnection(Connection.getConnectionByLongId(connectionId))
+ Connection.setTo(connectionId, logFile)
+
+ else:
+ raise Exception('Exception: ConnectionInfo: not SENDING or RECEIVED')
+
+ elif spacedStrings[1] in MESSAGE_TYPES or spacedStrings[1] == DISPATCH_MESSAGE:
+ timestamp = line[0:23]
+ commaValues = spacedStrings[3].split(',')
+
+ messageId = commaValues[0]
+ producerId = messageId[:messageId.rindex(':')]
+
+ connection = Connection.getConnectionByLongId(commaValues[2]) #commaValues[2] = connectionId
+ producer = Producer.getProducerByLongId(producerId)
+ producerConnection = Connection.getConnectionByLongId(producerId.rsplit(':', 2)[0]) #producerConnectionId
+ message = Message.getMessage(producer,
+ int(messageId[messageId.rindex(':') + 1:]), #producerSequenceId
+ commaValues[-1] == ADVISORY_TEXT)
+
+ producerConnection.addProducer(producer)
+
+ if spacedStrings[1] in MESSAGE_TYPES:
+
+ if spacedStrings[0] == 'SENDING:':
+
+ direction = (logFile == connection.fromFile)
+ connection.addSentMessage(message, direction, timestamp)
+ logFile.addSentMessage(message, timestamp)
+ message.addSendingConnection(connection, direction, connection,
+ int(commaValues[1]), timestamp) #commaValues[1] = commandId
+
+ elif spacedStrings[0] == 'RECEIVED:':
+
+ direction = (logFile == connection.toFile)
+ connection.addReceivedMessage(message, direction, timestamp)
+ logFile.addReceivedMessage(message, timestamp)
+ message.addReceivingConnection(connection, direction, connection,
+ int(commaValues[1]), timestamp) #commaValues[1] = commandId
+
+ elif spacedStrings[1] == DISPATCH_MESSAGE:
+
+ #additional parsing to get the consumer
+ consumerId = spacedStrings[4][len(CONSUMER_TEXT):]
+ consumer = Consumer.getConsumerByLongId(consumerId)
+ consumerConnection = Connection.getConnectionByLongId(':'.join(consumerId.split(':')[:3]))
+ consumerConnection.addConsumer(consumer)
+
+ if spacedStrings[0] == 'SENDING:':
+
+ direction = (logFile == connection.fromFile)
+ consumerConnection.addSentMessage(message, direction, timestamp)
+ logFile.addSentMessage(message, timestamp)
+ message.addSendingConnection(consumerConnection, direction, connection,
+ int(commaValues[1]), timestamp) #commaValues[1] = commandId
+
+ elif spacedStrings[0] == 'RECEIVED:':
+
+ direction = (logFile == connection.toFile)
+ consumerConnection.addReceivedMessage(message, direction, timestamp)
+ logFile.addReceivedMessage(message, timestamp)
+ message.addReceivingConnection(consumerConnection, direction, connection,
+ int(commaValues[1]), timestamp) #commaValues[1] = commandId
+
+ except Exception:
+ print logFile, line
+ raise
+
+
+ def clearData(self):
+ """
+ Clears all the data parsed.
+ """
+
+ Connection.clearData()
+ Producer.clearData()
+ Consumer.clearData()
+ Message.clearData()
+ LogFile.clearData()
+
+ def parseDirectory(self, directory):
+ """
+ Parses a directory of log files.
+ """
+
+ self.clearData()
+
+ fileNames = os.walk(directory).next()[2]
+ logFiles = [LogFile(directory + os.sep + fileName) for fileName in fileNames]
+
+ for logFile in logFiles:
+ self.parse(logFile)
+
+ LogFile.closeFiles()
+
+def main():
+ """
+ Entrance point for the command line test.
+ """
+
+ if len(sys.argv) != 2:
+ print 'Usage: python LogParser.py directory'
+ else:
+ startTime = time.time()
+ LogParser.getInstance().parseDirectory(sys.argv[1])
+ LogParser.deleteInstance()
+ print str(Message.messageCount) + ' messages parsed'
+ print 'in ' + str(time.time() - startTime) + ' seconds'
+
+ print 'press a key'
+ sys.stdin.read(3)
+
+ startTime = time.time()
+ for connection in Connection.connections.itervalues():
+ connection.getErrors()
+
+ for logFile in LogFile.logfiles:
+ logFile.getErrors()
+
+ print 'additional: ' + str(time.time() - startTime) + ' seconds'
+ time.sleep(36000)
+
+if __name__ == '__main__':
+ main()
+
Propchange: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/LogParser.py
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/LogParser.pyc
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-log-analyzer/loganalyzerengine/LogParser.pyc?rev=612559&view=auto
==============================================================================
Binary file - no diff available.
Propchange: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/LogParser.pyc
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Message.py
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Message.py?rev=612559&view=auto
==============================================================================
--- activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Message.py (added)
+++ activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Message.py Wed Jan 16 11:55:49 2008
@@ -0,0 +1,137 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
+
+"""
+Module Message
+"""
+
+class Message(object):
+ """
+ Objects of this class represent ActiveMQ messages.
+ They are used to store the 'travel path' of every message.
+ This class also stores a collection of all the Message objects.
+ """
+
+ messages = {}
+ messageCount = 0
+
+ def __init__(self, producer, prodSeqId, advisory):
+ """
+ Constructs a message object, given a producer and producer sequence id.
+ """
+
+ self.producer = producer
+ self.prodSeqId = prodSeqId
+ self.advisory = advisory
+ self.sendingConnections = {}
+ self.receivingConnections = {}
+
+ Message.messageCount += 1
+
+ @classmethod
+ def clearData(cls):
+ """
+ Deletes all the messages.
+ Returns nothing.
+ """
+
+ cls.messages.clear()
+ cls.messageCount = 0
+
+ @classmethod
+ def getMessage(cls, producer, prodSeqId, advisory = False):
+ """
+ Returns the Message object identified by (producer, prodSeqId)
+ where producer is a producer object and prodSeqId is a producer sequence id
+ message was first sent.
+
+ If the Message object does not exist, it will be created.
+ Returns a Message object.
+ """
+
+ messageId = (producer, prodSeqId)
+
+ if messageId not in cls.messages:
+ cls.messages[messageId] = Message(producer, prodSeqId, advisory)
+
+ return cls.messages[messageId]
+
+ @classmethod
+ def exists(cls, producer, prodSeqId):
+ """
+ Returns if there is a Message object identified by (producer, prodSeqId)
+ """
+
+ return (producer, prodSeqId) in cls.messages
+
+ def addSendingConnection(self, connection, direction, mostRecentConId, commandId, timestamp):
+ """
+ Adds a connection to the set of connections through which this message was sent.
+ The 'direction' argument is True if the message was sent from the file
+ connection.fromFile to the file connection.toFile, and False otherwise.
+ 'timestamp' is a string with the moment this message was sent trough the connection.
+
+ Returns nothing.
+ """
+
+ storedConnection = (connection, direction)
+ if storedConnection in self.sendingConnections:
+ self.sendingConnections[storedConnection].append((mostRecentConId, commandId, timestamp))
+ else:
+ self.sendingConnections[storedConnection] = [(mostRecentConId, commandId, timestamp)]
+
+ def addReceivingConnection(self, connection, direction, mostRecentConId, commandId, timestamp):
+ """
+ Adds a connection to the set of connections where this message was received.
+ The 'direction' argument is True if the message was sent from the file
+ connection.fromFile to the file connection.toFile, and False otherwise.
+ 'timestamp' is a string with the moment this message was received trough the connection.
+
+ Returns nothing.
+ """
+
+ storedConnection = (connection, direction)
+ if storedConnection in self.receivingConnections:
+ self.receivingConnections[storedConnection].append((mostRecentConId, commandId, timestamp))
+ else:
+ self.receivingConnections[storedConnection] = [(mostRecentConId, commandId, timestamp)]
+
+ def getFiles(self):
+ """
+ Returns a 2-tuple with the following 2 sets:
+ -set of LogFile objects where this message was sent.
+ -set of LogFile objects where this message was received.
+ """
+
+ sendingFiles = set()
+ receivingFiles = set()
+
+ for connection, direction in self.sendingConnections:
+
+ if direction:
+ sendingFiles.add(connection.fromFile)
+ else:
+ sendingFiles.add(connection.toFile)
+
+ for connection, direction in self.receivingConnections:
+
+ if direction:
+ receivingFiles.add(connection.toFile)
+ else:
+ receivingFiles.add(connection.fromFile)
+
+ return sendingFiles, receivingFiles
Propchange: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Message.py
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Message.pyc
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Message.pyc?rev=612559&view=auto
==============================================================================
Binary file - no diff available.
Propchange: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Message.pyc
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Producer.py
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Producer.py?rev=612559&view=auto
==============================================================================
--- activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Producer.py (added)
+++ activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Producer.py Wed Jan 16 11:55:49 2008
@@ -0,0 +1,111 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
+
+"""
+Module Producer
+"""
+
+class Producer(object):
+ """
+ This class represents an ActiveMQ Producer.
+ Each producer is identified by its long id.
+ However each producer also has a short id (an integer) to identify it more easily.
+ """
+
+ nProducers = 0
+ producerIdList = []
+ producers = {}
+
+ def __init__(self, longId):
+ """
+ Constructor
+ """
+
+ self.longId = longId
+ self.shortId = Producer.nProducers
+
+ self.connectionId, sessionId, value = longId.rsplit(':', 2)
+ self.sessionId = int(sessionId)
+ self.value = int(value)
+
+ Producer.producers[longId] = self
+ Producer.producerIdList.append(self.longId)
+ Producer.nProducers += 1
+
+ @classmethod
+ def clearData(cls):
+ """
+ Deletes all information read about producers.
+
+ Returns nothing.
+ """
+
+ cls.producers.clear()
+ cls.nProducers = 0
+ del cls.producerIdList[:]
+
+ @classmethod
+ def getProducerByLongId(cls, longId):
+ """
+ Returns a producer given its long id.
+ If there is no producer with this long id yet, it will be created.
+ """
+
+ if longId not in cls.producers:
+ cls.producers[longId] = Producer(longId)
+
+ return cls.producers[longId]
+
+ @classmethod
+ def getProducerByShortId(cls, shortId):
+ """
+ Returns a producer given its short id.
+ If there is no producer with thi short id yet, IndexError will be thrown.
+ """
+
+ return cls.producers[cls.producerIdList[shortId]]
+
+ @classmethod
+ def exists(cls, longid):
+ """
+ Returns if a producer with the given long id exists.
+ """
+
+ return longid in cls.producers
+
+ @classmethod
+ def shortIdToLongId(cls, shortId):
+ """
+ Transforms a producer's short id to a long id.
+
+ Returns a long id.
+ Throws an IndexError if the short id does not exist.
+ """
+
+ return cls.producerIdList[shortId]
+
+ @classmethod
+ def longIdToShortId(cls, longId):
+ """
+ Transforms a producer's long id to a short id.
+
+ Returns a long id.
+ Throws an KeyError if the long id does not exist.
+ """
+ return cls.producers[longId].shortId
+
+
Propchange: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Producer.py
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Producer.pyc
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Producer.pyc?rev=612559&view=auto
==============================================================================
Binary file - no diff available.
Propchange: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/Producer.pyc
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/__init__.py
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-log-analyzer/loganalyzerengine/__init__.py?rev=612559&view=auto
==============================================================================
--- activemq/sandbox/activemq-log-analyzer/loganalyzerengine/__init__.py (added)
+++ activemq/sandbox/activemq-log-analyzer/loganalyzerengine/__init__.py Wed Jan 16 11:55:49 2008
@@ -0,0 +1,18 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
+
+
Propchange: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/__init__.py
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/__init__.pyc
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-log-analyzer/loganalyzerengine/__init__.pyc?rev=612559&view=auto
==============================================================================
Binary file - no diff available.
Propchange: activemq/sandbox/activemq-log-analyzer/loganalyzerengine/__init__.pyc
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream