ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » WMQI Timestamp Arithmetic

Post new topic  Reply to topic
 WMQI Timestamp Arithmetic « View previous topic :: View next topic » 
Author Message
mverh
PostPosted: Fri Mar 08, 2002 3:16 pm    Post subject: Reply with quote

Voyager

Joined: 06 Mar 2002
Posts: 97

Has anyone developed some ESQL where I can substract two timestamps to get the difference?
Back to top
View user's profile Send private message
Miriam Kaestner
PostPosted: Sat Mar 09, 2002 8:36 am    Post subject: Reply with quote

Centurion

Joined: 26 Jun 2001
Posts: 103
Location: IBM IT Education Services, Germany

Just subtract the two timestamps, but not that the result must be of data type INTERVAL.
Back to top
View user's profile Send private message Send e-mail
mverh
PostPosted: Wed Mar 13, 2002 6:33 am    Post subject: Reply with quote

Voyager

Joined: 06 Mar 2002
Posts: 97

Okay, I've written the ESQL to compute the difference between two timestamps and I've noticed something that is interesting and wonder if anyone else has seen this behaviour.

I have a simple flow that is:

MQInput->Compute1->Compute2->MQOutput

Compute1 gets the CURRENT_GMTTIMESTAMP (start) and places it in the Environment tree. It then parses the XML input message which contains a counter. This counter is used to control a loop which adds an element to an output message. So if my input message looks like <Message><Counter>5000</Counter></Message> I loop 5000 times and adds the element Loop to the input message so the output message looks like <Message><Counter>5000</Counter><Loop>5000</Loop></Message>

Compute2 recieves control and gets the CURRENT_GMTTIMESTAMP (end) then reads the Enviroment tree to get the start time and substracts this from the end time and places it in the output message.

Now what is intriguing is that it appears the granuarity of the register CURRENT_GMTTIMESTAMP is somewhere around 15-16 ms. I deduce this by lowering the Counter in the input message until my elapsed time tends to zero. When I do this and pump hundreds of messages through the flow my elapsed time is either 0, 15 or 16 ms and never anything else. If I then increase the Counter slightly my elapsed times are either 15, 16, 31 or 32.

Has anyone else done this testing and seen this behaviour? Does anyone know of a way of getting the system time in real time such that these calculations can be made meaningful?

Back to top
View user's profile Send private message
kirani
PostPosted: Wed Mar 13, 2002 5:33 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Try using Execute time plug-in node (Supportpac - IA0A) from url, http://www-4.ibm.com/software/ts/mqseries/txppacs/ia0a.html

Kiran
Back to top
View user's profile Send private message Visit poster's website
mverh
PostPosted: Thu Mar 14, 2002 11:10 am    Post subject: Reply with quote

Voyager

Joined: 06 Mar 2002
Posts: 97

The ExecuteTime plugin won't do since we need to have the timing numbers as part of the message itself...execute time writes to the event log and it is difficult if not impossible to correlate the log entries to an individual message...IMHO ExecuteTime should include the MsgId and CorrelId in the event it logs...this would help...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » WMQI Timestamp Arithmetic
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.