[RADIATOR] calculating processing time for packet

Bruno Tiago Rodrigues bruno.tiago.rodrigues at gmail.com
Tue Sep 17 10:13:43 UTC 2019


Is there any direct way to extract the current processing time the packet
has taken?

I'm injecting this on seldomly used hook but I'm afraid it does not scale
properly once it gets propagated to a production environment:

my ($seconds, $micro) = &Radius::Util::getTimeHires();
my $timehires = sprintf("%d.%0$6d",$seconds,$micro);
my $recvtime = sprintf ("%d.%06d",$r->{RecvTime},$r->{RecvTimeMicros});
$timehires-=$recvtime;
#timehires now has the number of elapsed seconds.microseconds since the
packet was received

I had a look at $r->{StatsTrail}, but it seems to show stats for the
previous packet.

Is there any easir (and efficient) way to extract the current packet
processing time?

Thanks in advance


Bruno Tiago Rodrigues
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.open.com.au/pipermail/radiator/attachments/20190917/e65e8499/attachment.html>


More information about the radiator mailing list