Hello All I have a rather difficult problem I am trying to solve.
I have two arrays with a series of request times and response times for some network communication (UDP-SNMP communications). The data is such that I cannot accurately state what response coincides with what request and there can be less responses then requests. For example: Response Times: 1123522351.49722 1123522351.49724 1123522351.49727 1123522351.49730 1123522351.51042 1123522351.60701 Request Times: 1123522351.50794 1123522351.50868 1123522351.50968 1123522351.54463 1123522351.60934 I need to try and determine the avg. response time for all of the request/responses. Now given that there is no accurate way to determine what response lines up with what request, I need to do some guessing here. Looking at the lists, it would appear that the 1st 3 responses do line up with the 1st 3 requests and the 4th response time appears to line up with the 5th request. So, estimating it would appear that the 4th request was not answered (a possibility as the communication is UDP so there is no guarantee of delivery). My question is this, how can I attempt to ascertain what the avg response time is using 'best guesses'? The way I have it now, is that I compare each index of the array to the coinciding index of the other array. If the response times is a neg. value, I throw it out and if the response time is too high (over 5 secs) I throw it out. This is obvisouly not the best way. Anyone have any ideas on how I can solve this problem? There is no additional details I can use in the source data so I am limited in that aspect. Thanks! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>