Posted: Thu Oct 20, 2011 4:47 am Post subject: Time used by the ESQL in a compute node
Knight
Joined: 25 Aug 2006 Posts: 589
I am using WMB V6.1 CSD 9 on Windows. I have a message flow which spent 5 minutes in a compute node processing a very complex XML message. We like to find out which section of the code is using most of the time so that we can optimise it. We thought about inserting statements like
SET Environment.Time = CAST(CURRENT_TIMESTAMP AS CHAR FORMAT 'yyyyMMddHHmmss.sss'); at various locations of the ESQL code and output the environment later. But it is documented that we will always have the same value for CURRENT_TIMESTAMP within the node.
I am looking for suggestion on how this can be done. Is there any ESQL function that will give us the actual time as the code executes ?
The original design is probably bad. The flow is using file input and output. The input file is 10 MB in size. A user trace will be huge unless we are able to get a smaller file which we are sure that exercise all the code. The source file provider is not willing to provide that at this time.
Is the file being processed in records? I.e. can you take a user trace just long enough to see one iteration of a loop... or at least make sure that usertrace is big enough to hold the LAST iteration through the loop...
Otherwise instead of trying to stick stuff into Environment and making fancy date calculations, use the esql LOG statement to write to user trace (which is otherwise disabled).
This will show you the points in your code as they get executed and create reliable timestamps for those points.
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